12 #include <ints/IntSeqRemove.hpp> 13 #include <ios/Logger.hpp> 14 #include <metaprogramming/SFINAE.hpp> 15 #include <smet/NnarySmET.hpp> 16 #include <smet/Reference.hpp> 17 #include <tens/TensClass.hpp> 18 #include <tens/TensComp.hpp> 23 #define DEFINE_NAMED_BINDER(TG, 30 return bind<TG>(forw<T>(ref),id); 34 #define DEFINE_NAMED_RW_OR_COL_BINDER(TG, 43 typename RemRef<T>::Tk; 51 tupleHasType<Rw ## TG,Tp>; 55 tupleHasType<Cn ## TG,Tp>; 58 constexpr bool hasOnlyOneType= 60 static_assert(hasOnlyOneType,"Both types Rw and Cn identfied!"); 63 constexpr bool hasAtLeastOneType= 65 static_assert(hasAtLeastOneType,"No types Rw and Cn identfied!"); 69 Conditional<hasRw,Rw ## TG,Cn ## TG>; 71 return bind<Ret>(forw<T>(ref),id); 78 template <
typename TG,
83 public ConstrainAreSmETs<_Refs...>
134 template <
typename...
Args,
154 template <
typename...
Args>
167 cout<<
" evaluating binder of component "<<
Tg::
name();
168 cout<<
" position in NestedTk: "<<
pos;
192 template <
typename SMET,
200 cout<<
"Constructing binder "<<
this<<
", type "<<
TG::
name()<<
", component: "<<
id<<
endl;
209 cout<<
"Destroying binder "<<
this<<
endl;
218 template <
typename _Tg,
229 CompOrTwinned<_Tg,SMET>;
233 cout<<
"Constructing a binder for type "<<Tg::name()<<
" , storage: "<<getStor(ref)._v<<endl;
237 Binder<Tg,SMET> b(forw<SMET>(smet),id);
241 typename Unqualified<SMET>::Tk;
248 constexpr
bool FullyBound=
252 if constexpr(FullyBound)
#define AS_ASSIGNABLE_AS_REF(ID)
Get the same assignability of a given ref.
#define MERGED_COMPS_VIEW_OF_REF(I)
Returns the merged comps view of the I-th Ref.
#define STATIC_ASSERT_TUPLE_HAS_TYPE(T,TP)
Assert if the type T is not in the types of tuple TP.
#define PROVIDE_POS_OF_RES_TCS_IN_REFS
Provide the position of result Tk TensComp in each input.
#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_MERGEABLE_COMPS_ACCORDING_TO_REFS_AND_EXTRA
Provide MergeableComps delimiter according to references and extra.
#define PROVIDE_SIMPLE_NNARY_COMP_SIZE
#define SFINAE_WORSEN_DEFAULT_VERSION_TEMPLATE_PARS
#define SAME_FUND_AS_REF(ID)
Get the same Fund type of a given ref.
#define PROVIDE_NNARY_GET_MERGED_COMPS_VIEW(DESCRIPTION,...)
Provides a getMergedCompsView method, taking Is as template parameter.
#define FORWARD_IS_ALIASING_TO_REFS
decltype(auto) bind(SMET &&smet, const int id, DummyTypes...)
#define STATIC_ASSERT_IS_NNARY_SMET(...)
Defines the check for a Nnary SmET.
#define PROVIDE_EXTRA_MERGE_DELIMS(...)
Add an ExtraDelims IntSeq called ExtraDelims.
#define SFINAE_WORSEN_DEFAULT_VERSION_ARGS_CHECK
Check that no extra arg is passed.
#define NOT_STORING
Set the SmET to not-storing.
decltype(auto) operator+(T1 &&smet1, T2 &&smet2)
Implement smet1+smet2.
const int id
Index to get.
#define SFINAE_WORSEN_DEFAULT_VERSION_ARGS
Provide empty list of args, used to unprioritize default version.
#define DECLAUTO
Short name for decltype(auto)
#define PROVIDE_SMET_ASSIGNEMENT_OPERATOR(UNARY_SMET)
Defines the assignement operator, calling assign.
#define PROVIDE_NNARY_SMET_REFS_AND_CHECK_ARE_N(N)
decltype(auto) evalThroughRepresentativeFunctionPassingCompsByName(Ts &&...ts)
#define DEFINE_BASE_TYPE(TYPE,...)