1 #ifndef _INTSEQGETEL_HPP 2 #define _INTSEQGETEL_HPP 4 #include <ints/IntSeqCat.hpp> 5 #include <utility/Position.hpp> 19 DECLAUTO _IntSeqGetAllButFirstN(IntSeq<Head,Tail...>)
21 static_assert(N>=0
and N<=
sizeof...(Tail)+1,
"N must be in the range [0,size)");
24 return IntSeq<Head,Tail...>{};
27 return IntSeq<Tail...>{};
29 return _IntSeqGetAllButFirstN<N-1>(IntSeq<Tail...>{});
37 using IntSeqGetAllButFirstN=
38 decltype(_IntSeqGetAllButFirstN<N>(Is{}));
41 template <
typename Is>
42 using IntSeqGetAllButFirst=
43 IntSeqGetAllButFirstN<1,Is>;
58 bool ReturnNotPresent,
61 constexpr
DECLAUTO _IntSeqGetElAfterAppending(IntSeq<Head...>)
69 Is::
template element<Pos>();
72 if constexpr(P==NOT_PRESENT
and not ReturnNotPresent)
82 bool ReturnNotPresent,
85 DECLAUTO _IntSeqGetElsAfterAppending(IntSeq<Pos...>,
88 return IntSeqCat<decltype(_IntSeqGetElAfterAppending<Tail,ReturnNotPresent,Pos>(IntSeq<Head...>{}))...>{};
97 bool ReturnNotPresent,
100 using IntSeqGetElsAfterAppending=
101 decltype(_IntSeqGetElsAfterAppending<Tail,ReturnNotPresent>(Pos{},Head{}));
#define DECLAUTO
Short name for decltype(auto)