38#ifndef LIB_META_VARIADIC_HELPER_H
39#define LIB_META_VARIADIC_HELPER_H
56 template<
size_t...idx>
115 template<
typename...TYPES>
118 enum {
SIZ =
sizeof...(TYPES) };
138 template<
typename...TYPES>
165 template<
class X,
typename =
void>
168 static constexpr size_t SIZ = 1;
169 using Idx = std::index_sequence<SIZ>;
171 using Tup = std::tuple<X>;
173 template<
template<
class>
class META>
175 template<
template<
typename...>
class O>
177 template<
template<
class>
class PRED>
179 template<
template<
class>
class PRED>
184 template<
typename...TYPES>
187 static constexpr size_t SIZ =
sizeof...(TYPES);
188 using Idx = std::make_index_sequence<SIZ>;
192 template<
template<
class>
class META>
195 template<
template<
typename...>
class O>
198 template<
template<
class>
class PRED>
201 template<
template<
class>
class PRED>
223 template<
class FUN,
size_t...idx>
224 static constexpr void
227 (fun (std::integral_constant<size_t,idx>{}), ...);
230 template<
class FUN,
size_t...idx>
231 static constexpr bool
234 return (fun (std::integral_constant<size_t,idx>{})
and ...);
237 template<
class FUN,
size_t...idx>
238 static constexpr bool
241 return (fun (std::integral_constant<size_t,idx>{})
or ...);
244 using IdxSeq = std::make_index_sequence<N>;
248 static constexpr void
255 static constexpr bool
262 static constexpr bool
279 template<
class TTX,
class FUN>
286 template<
class TTX,
class FUN>
293 template<
class TTX,
class FUN>
318 template<
typename ARG,
typename...ARGS>
329 template<
typename ARG,
typename...ARGS>
333 return std::forward<ARG>(a);
342 template<
bool,
typename,
size_t idx>
347 template<
typename DEFAULT,
size_t idx>
350 template<
typename...ARGS>
368 template<
size_t idx,
typename...ARGS>
369 constexpr inline auto
372 static_assert (idx <
sizeof...(args),
"insufficient number of arguments");
384 template<
size_t idx,
typename DEFAULT,
typename...ARGS>
385 constexpr inline auto
388 return SelectOrInit<(idx <
sizeof...(args)),
DEFAULT, idx>::get (std::forward<ARGS> (
args)...);
Implementation namespace for support and library code.
Metaprogramming: simple helpers for working with lists-of-types.
A template metaprogramming technique for manipulating collections of types.
Some basic facilities for manipulating type sequences.
Metaprogramming support to rebuild and rebind variadic templates.