1 #ifndef _SCALAR_WRAP_HPP 2 #define _SCALAR_WRAP_HPP 10 #include <smet/NnarySmET.hpp> 11 #include <tens/TensKind.hpp> 21 template <
typename _Fund,
24 public BaseScalarWrapper,
60 return alias==scRef;);
70 template <
typename Oth>
77 template <
typename...Args>
81 std::cout<<
" is: "<<isLvalue<_Fund><<
", "<<isLvalue<decltype(scRef)><<
" "<<scRef<<std::endl;
int compSize() const
Returns the size of a component, which is always 1.
ScalarWrapper< Ts... > scalarWrap(Ts &&...smets)
#define STATIC_ASSERT_ARE_N_TYPES(N, UNEXP_PARPACK)
Static assert if not passing exactly N types.
#define PROVIDE_TK(...)
Provides the Tk member.
#define PROVIDE_FUND(...)
Provides the Fund member.
#define STORING
Set the SmET to storing.
#define PROVIDE_GET_MERGED_COMPS_VIEW(DESCRIPTION,...)
Provides a getMergedCompsView method, taking Is as template parameter.
#define IDENTITY_REPRESENTATIVE_FUNCTION
Provide an identity representative function.
static constexpr const char * name()
Name of the Tk provided with "name()" suffix.
#define PROVIDE_MERGEABLE_COMPS(LONG_DESCRIPTION,...)
#define IS_ASSIGNABLE_ATTRIBUTE(LONG_DESCRIPTION,...)
Provides a isAssignable attribute.
#define STATIC_ASSERT_IS_NNARY_SMET(...)
Defines the check for a Nnary SmET.
static constexpr int element()
Get the I element of the sequence.
ScalarWrapper(T &&val)
Constructor taking universal reference.
decltype(auto) operator+(T1 &&smet1, T2 &&smet2)
Implement smet1+smet2.
ScRef scRef
Provides a reference or a value, depending on _Fund.
#define PROVIDE_ALSO_NON_CONST_METHOD(NAME)
#define SIMPLE_NNARY_SMET_BUILDER(BUILDER,NNARY_SMET)
ScalarWrapper & operator=(Oth &&oth)
Assignement operator.
#define PROVIDE_NNARY_SMET_REFS_AND_CHECK_ARE_N(N)
auto & eval(Args &&...args) const
Provides either the const or non-const evaluator.
decltype(auto) evalThroughRepresentativeFunctionPassingCompsByName(Ts &&...ts)
#define ABSORB_DUPLICATED_NNARY_SMET_CALL(CALLER,NNARY_SMET)
#define DEFINE_BASE_TYPE(TYPE,...)
#define PROVIDE_IS_ALIASING(LONG_DESCRIPTION,...)
Provides a isAliasing method, taking alias as argument.