SUNphi  1.0
ScalarWrap.hpp File Reference

Defines a class which wraps a pure scalar into a SmET, to be used in expressions. More...

#include <smet/NnarySmET.hpp>
#include <tens/TensKind.hpp>

Go to the source code of this file.

Classes

struct  SUNphi::BaseScalarWrapper
 
struct  SUNphi::ConstrainAreScalarWrappers< Args >
 
class  SUNphi::ScalarWrapper< _Fund, _Refs >
 

Typedefs

template<typename T , typename Ret = void>
using SUNphi::EnableIfIsScalarWrapper = EnableIf< isScalarWrapper< T >,Ret >
 
template<typename T >
using SUNphi::ConstrainIsScalarWrapper = ConstrainIsBaseOf< BaseScalarWrapper,T >
 
template<typename T >
using SUNphi::ConstrainIsNotScalarWrapper = ConstrainIsNotBaseOf< BaseScalarWrapper,T >
 

Functions

template<typename... Ts>
ScalarWrapper< Ts... > SUNphi::scalarWrap (Ts &&...smets)
 
void SUNphi::neverInstantiatedFunction ()
 
template<typename D , TypeIf<(isSmET< D >), void * > = nullptr>
decltype(auto) SUNphi::scalarWrap (D &&smet)
 

Variables

template<typename T >
constexpr bool SUNphi::isScalarWrapper = isBaseOf<BaseScalarWrapper ,T>
 

Detailed Description

Defines a class which wraps a pure scalar into a SmET, to be used in expressions.

Definition in file ScalarWrap.hpp.

Typedef Documentation

template<typename T >
using SUNphi::ConstrainIsNotScalarWrapper = typedef ConstrainIsNotBaseOf<BaseScalarWrapper ,T>

Class forcing T not to inherits from BaseScalarWrapper

Definition at line 16 of file ScalarWrap.hpp.

template<typename T >
using SUNphi::ConstrainIsScalarWrapper = typedef ConstrainIsBaseOf<BaseScalarWrapper ,T>

Class forcing T to inherits from BaseScalarWrapper

Definition at line 16 of file ScalarWrap.hpp.

template<typename T , typename Ret = void>
using SUNphi::EnableIfIsScalarWrapper = typedef EnableIf< isScalarWrapper <T> ,Ret>

Provides the class itself if T is of the given type

Provides the class itself if T satisfies the condition

Definition at line 16 of file ScalarWrap.hpp.

Function Documentation

void SUNphi::neverInstantiatedFunction ( )

Forward definition of a never instantiated expression

template<typename... Ts>
ScalarWrapper<Ts...> SUNphi::scalarWrap ( Ts &&...  smets)

< Name of the NnarySmET to build

Simple ScalarWrapper builder called scalarWrap

Plain ScalarWrapper getting n plain SmET

Parameters
smetsSmETs to act upon

Definition at line 101 of file ScalarWrap.hpp.

template<typename D , TypeIf<(isSmET< D >), void * > = nullptr>
decltype(auto) SUNphi::scalarWrap ( D &&  smet)

< Type to absorb

Simplify scalarWrap ( SmET ) expression

Returns the reference

Parameters
smetNnarySmET to absorb

Definition at line 104 of file ScalarWrap.hpp.

Variable Documentation

template<typename T >
constexpr bool SUNphi::isScalarWrapper = isBaseOf<BaseScalarWrapper ,T>

Expression which is true if T inherits from BaseScalarWrapper

Definition at line 16 of file ScalarWrap.hpp.