17 #include <ints/IntSeqInsert.hpp> 18 #include <metaprogramming/TypeTraits.hpp> 19 #include <tens/TensComp.hpp> 20 #include <tens/TwinsComp.hpp> 21 #include <tuple/Filter.hpp> 22 #include <tuple/TupleElements.hpp> 23 #include <tuple/TupleOrder.hpp> 24 #include <tuple/TupleTypeCat.hpp> 66 #define STATIC_ASSERT_IS_DYNAMIC(TC) 67 static_assert(isDynamic<TC>,"Error, Tens Comp is not dynamic") 70 template <
typename Tc>
98 template <
int NScanned,
119 return __PRETTY_FUNCTION__;
142 template <
typename Oth,
148 template <
typename TC,
164 template <
typename Tab>
175 template <
typename F,
210 template <
typename F>
227 template <
typename Is>
252 template <
int...
Ints>
259 template <
int...
Ints>
269 template <
typename Is>
270 struct TensCompsListMerged;
273 template <
int...IComps>
274 struct TensCompsListMerged<
IntSeq<IComps...>>
277 static constexpr
int firstComp=
278 IntSeq<IComps...>::
template element<0>();
281 static constexpr
bool realMerge=
282 (
sizeof...(IComps)>1);
286 decltype(getIndexed(intSeq<IComps...>,
290 static constexpr
int totMaxKnonwSubMultiple=
291 tensCompsListTotMaxKnownSubMultiple<IComps...>;
294 static constexpr
int totSize=
295 tensCompsListTotSize<IComps...>;
298 using type=Conditional<realMerge,
300 TensComp<MergedComps,totSize,totMaxKnonwSubMultiple>,
302 TupleElementType<firstComp,types>>;
308 template <
typename Is,
313 template <
typename Is>
320 template <
typename Is>
323 static_assert(isOrderedIntSeq<Is>,
"Not an ordered IntSeq");
329 template <
int...IDelims,
341 Delims::
template element<I>(),
343 Delims::
template element<I+1>()>;
347 using TensCompsGroupMerged=
348 typename TensCompsListMerged<Range<I>>::type;
351 using type=TensKind<TensCompsGroupMerged<IGroups>...>;
355 template <
typename Is>
366 template <
typename Tp>
367 class _BlendWithTypes;
373 template <
typename...
Oths>
415 template <
typename OthTk,
424 template <
typename...>
425 struct _BlendTensKinds;
430 template <
typename Tk>
431 struct _BlendTensKinds<Tk>
435 ConstrainIsTensKind<Tk>;
445 template <
typename Head1,
448 struct _BlendTensKinds<Head1,Head2,Tail...>
452 ConstrainAreTensKinds<Head1,Head2,Tail...>;
456 typename _BlendTensKinds<
typename Head1::
template BlendWithTensKind<Head2>,
463 template <
typename...Args>
464 using BlendTensKinds=
465 typename _BlendTensKinds<Args...>::type;
#define DEFINE_HAS_MEMBER(TAG)
#define STATIC_ASSERT_TUPLE_TYPES_ARE_ALL_DIFFERENT(T)
Assert if the Tuple contains multiple times a given type.
static constexpr const char * name()
Name of the Tk provided with "name()" suffix.
#define DEFINE_VARIADIC_TYPE_FROM_TUPLE(TYPE)
static constexpr int element()
Get the I element of the sequence.
decltype(auto) operator+(T1 &&smet1, T2 &&smet2)
Implement smet1+smet2.
#define STATIC_ASSERT_IS_DYNAMIC(TC)
Forces type Tc to be a dynamic TensComp.
#define DECLAUTO
Short name for decltype(auto)
Helper to constrain the cast.
IntSeq<(T::size==DYNAMIC)... > AreDynamic
Check that all types are different.
#define DEFINE_BASE_TYPE(TYPE,...)