Skip to content

File su2getgetreturntype.h

File List > algebra > su2algebra > helpers > su2getgetreturntype.h

Go to the documentation of this file

#ifndef COSMOINTERFACE_SU2ALGEBRA_HELPERS_SU2GETGETRETURNTYPE_H
#define COSMOINTERFACE_SU2ALGEBRA_HELPERS_SU2GETGETRETURNTYPE_H

/* This file is part of TempLat, available at https://cosmolattice.github.io/templat .
   Copyright 2021-2026 The TempLat authors, see AUTHORS.md.
   Released under the MIT license, see LICENSE.md. */

// File info: Main contributor(s): Adrien Florio, Year: 2019

#include "TempLat/lattice/algebra/helpers/getgetreturntype.h"
#include "TempLat/util/rangeiteration/tag.h"
#include "TempLat/lattice/algebra/su2algebra/helpers/su2get.h"

namespace TempLat
{
  template <typename T> struct SU2GetGetReturnType {
    using type = typename GetGetReturnType<
        std::decay_t<decltype(SU2Getter::get(std::declval<T>(), std::declval<Tag<1>>()))>>::type;
    // Note: we check the type of the field 1 and not 0,
    // as 1 is really an object.
    static constexpr bool isComplex = IsComplexType<type>;
  };
} // namespace TempLat

#endif