19 #include <initializer_list>
20 #include <type_traits>
24 #if defined(__clang__)
25 #pragma GCC diagnostic push
26 #pragma GCC diagnostic ignored "-Wunknown-pragmas"
27 #pragma GCC diagnostic ignored "-Wpragmas"
28 #pragma GCC diagnostic ignored "-Wdocumentation-deprecated-sync"
124 template <
typename T>
125 constexpr T *_nullptr_v()
139 template <
typename T>
140 using _t =
typename T::type;
142 #if defined(__cpp_variable_templates) || defined(META_DOXYGEN_INVOKED)
143 template <
typename T>
147 constexpr
typename T::type::value_type
_v = T::type::value;
155 template <
typename T>
161 template <std::
size_t N>
162 using size_t = std::integral_constant<std::size_t, N>;
167 using bool_ = std::integral_constant<bool, B>;
172 using int_ = std::integral_constant<int, I>;
177 using char_ = std::integral_constant<char, Ch>;
183 template <
typename T>
184 using inc = std::integral_constant<decltype(T::type::value + 1), T::type::value + 1>;
188 template <
typename T>
189 using dec = std::integral_constant<decltype(T::type::value - 1), T::type::value - 1>;
194 template <
typename T,
typename U>
195 using plus = std::integral_constant<decltype(T::type::value + U::type::value),
196 T::type::value + U::type::value>;
201 template <
typename T,
typename U>
202 using minus = std::integral_constant<decltype(T::type::value - U::type::value),
203 T::type::value - U::type::value>;
208 template <
typename T,
typename U>
209 using multiplies = std::integral_constant<decltype(T::type::value * U::type::value),
210 T::type::value * U::type::value>;
215 template <
typename T,
typename U>
216 using divides = std::integral_constant<decltype(T::type::value / U::type::value),
217 T::type::value / U::type::value>;
222 template <
typename T>
223 using negate = std::integral_constant<decltype(-T::type::value), -T::type::value>;
228 template <
typename T,
typename U>
229 using modulus = std::integral_constant<decltype(T::type::value % U::type::value),
230 T::type::value % U::type::value>;
235 template <
typename T,
typename U>
241 template <
typename T,
typename U>
247 template <
typename T,
typename U>
253 template <
typename T,
typename U>
259 template <
typename T,
typename U>
265 template <
typename T,
typename U>
271 template <
typename T,
typename U>
272 using bit_and = std::integral_constant<decltype(T::type::value & U::type::value),
273 T::type::value & U::type::value>;
278 template <
typename T,
typename U>
279 using bit_or = std::integral_constant<decltype(T::type::value | U::type::value),
280 T::type::value | U::type::value>;
285 template <
typename T,
typename U>
286 using bit_xor = std::integral_constant<decltype(T::type::value ^ U::type::value),
287 T::type::value ^ U::type::value>;
292 template <
typename T>
293 using bit_not = std::integral_constant<decltype(~T::type::value), ~T::type::value>;
299 template <
typename T>
304 template <
typename T>
309 template <
typename T,
typename U>
314 template <
typename T,
typename U>
319 template <
typename T,
typename U>
324 template <
typename T,
typename U>
329 template <
typename T>
334 template <
typename T,
typename U>
339 template <
typename T,
typename U>
344 template <
typename T,
typename U>
349 template <
typename T,
typename U>
354 template <
typename T,
typename U>
359 template <
typename T,
typename U>
364 template <
typename T,
typename U>
369 template <
typename T,
typename U>
374 template <
typename T,
typename U>
379 template <
typename T,
typename U>
384 template <
typename T>
390 template <
typename F,
typename... Args>
398 template <
typename F,
typename... Args>
406 template <
typename T>
413 template <
typename...>
422 template <
typename... Ts>
423 using invoke =
_t<impl<Ts...>>;
428 template <
typename T>
436 template <
typename T>
442 template <
typename... Ts>
448 template <
typename,
typename =
void>
451 using type = std::false_type;
454 template <
typename T>
455 struct is_trait_<T, void_<typename T::type>>
457 using type = std::true_type;
460 template <
typename,
typename =
void>
463 using type = std::false_type;
466 template <
typename T>
467 struct is_callable_<T, void_<quote<T::template
invoke>>>
469 using type = std::true_type;
472 template <
template <
typename...>
class,
typename,
typename =
void>
477 template <
template <
typename...>
class C,
typename... Ts>
478 struct defer_<C, list<Ts...>, void_<C<Ts...>>>
480 using type = C<Ts...>;
483 template <
typename T,
template <T...>
class,
typename,
typename =
void>
488 template <
typename T,
template <T...>
class C, T... Is>
489 struct defer_i_<T, C, integer_sequence<T, Is...>, void_<C<Is...>>>
491 using type = C<Is...>;
499 template <
typename T>
505 template <
typename T>
524 template <
template <
typename...>
class C,
typename... Ts>
525 struct defer : detail::defer_<C, list<Ts...>>
535 template <
typename T,
template <T...>
class C, T... Is>
536 struct defer_i : detail::defer_i_<T, C, integer_sequence<T, Is...>>
546 template <
template <
typename...>
class C,
typename... Ts>
555 template <
typename T,
template <T...>
class C, T... Is>
576 template <
typename T>
581 template <
typename T>
589 template <
typename,
template <
typename...>
class>
590 struct is_ : std::false_type
594 template <
typename... Ts,
template <
typename...>
class C>
595 struct is_<C<Ts...>, C> : std::true_type
604 template <
typename T,
template <
typename...>
class C>
609 template <
typename... Fs>
614 template <
typename F0>
617 template <
typename... Ts>
618 using invoke = invoke<F0, Ts...>;
621 template <
typename F0,
typename... Fs>
624 template <
typename... Ts>
632 template <
typename... Fns>
638 template <
template <
typename...>
class C>
643 template <
typename... Ts>
644 using invoke =
_t<
defer<C, Ts...>>;
650 template <
typename T,
template <T...>
class C>
655 template <
typename... Ts>
656 using invoke =
_t<
defer_i<T, C, Ts::type::value...>>;
659 #if __GNUC__ == 4 && __GNUC_MINOR__ <= 8 && \
660 !defined(__clang__) && !defined(META_DOXYGEN_INVOKED)
661 template <
template <
typename...>
class C>
664 template <
typename... Ts>
668 template <
typename T,
template <T...>
class C>
671 template <
typename... Ts>
672 using invoke = _t<invoke<quote_i<T, C>, Ts...>>;
681 template <
template <
typename...>
class C>
687 template <
typename T,
template <T...>
class C>
695 template <
typename F,
typename... Ts>
698 template <
typename... Us>
699 using invoke = invoke<F, Ts..., Us...>;
705 template <
typename F,
typename... Us>
708 template <
typename... Ts>
709 using invoke = invoke<F, Ts..., Us...>;
716 template <
typename Fn,
typename... Ts>
721 template <
typename Fn,
typename... Ts>
731 template <
typename F,
typename List>
736 template <
typename F,
typename Ret,
typename... Args>
741 template <
typename F,
template <
typename...>
class T,
typename... Ts>
746 template <
typename F,
typename T, T... Is>
747 struct apply<F, integer_sequence<T, Is...>>
756 template <
typename C,
typename List>
761 template <
typename F,
typename List>
768 template <
typename F,
typename Q = quote<list>>
774 template <
typename F>
781 template <
typename F,
typename Q = quote<list>>
786 template <
typename F>
792 template <
typename F>
796 template <
typename... Ts>
800 template <
typename A,
typename B,
typename... Ts>
806 template <
typename... Ts>
807 using invoke =
_t<impl<Ts...>>;
814 template <
typename F>
821 template <
typename...>
825 template <
typename F,
typename... Gs>
828 template <
typename... Ts>
837 template <
typename... Fs>
838 using on = detail::on_<Fs...>;
844 template <
typename F,
typename G>
853 template <
typename...>
858 template <
typename If>
859 struct _if_<If> : std::enable_if<If::type::value>
863 template <
typename If,
typename Then>
864 struct _if_<If, Then> : std::enable_if<If::type::value, Then>
868 template <
typename If,
typename Then,
typename Else>
869 struct _if_<If, Then, Else> : std::conditional<If::type::value, Then, Else>
877 template <
typename... Args>
878 using if_ =
_t<detail::_if_<Args...>>;
882 template <
bool If,
typename... Args>
889 template <
typename... Args>
894 template <
bool If,
typename... Args>
901 template <
typename... Bools>
905 struct _and_<> : std::true_type
909 template <
typename Bool,
typename... Bools>
910 struct _and_<Bool, Bools...>
911 :
if_c<!Bool::type::value, std::false_type, _and_<Bools...>>
915 template <
typename... Bools>
919 struct _or_<> : std::false_type
923 template <
typename Bool,
typename... Bools>
924 struct _or_<Bool, Bools...> :
if_c<Bool::type::value, std::true_type, _or_<Bools...>>
937 template <
typename Bool>
942 #if (__GNUC__ == 5) && (__GNUC_MINOR__ == 1) && !defined(__clang__)
945 template <
bool... Bools>
949 template <
bool... Bools>
957 template <
typename... Bools>
963 template <
typename... Bools>
964 using and_ =
_t<detail::_and_<Bools...>>;
968 template <
bool... Bools>
975 template <
typename... Bools>
981 template <
typename... Bools>
982 using or_ =
_t<detail::_or_<Bools...>>;
988 template <
typename... Bools>
993 template <
typename... Bools>
998 template <
typename Bool>
1003 template <
typename... Bools>
1008 template <
typename... Bools>
1017 template <
typename,
typename,
typename,
typename =
void>
1022 template <
typename State,
typename Fun>
1023 struct fold_<list<>, State, Fun>
1028 template <
typename Head,
typename... List,
typename State,
typename Fun>
1029 struct fold_<list<Head, List...>, State, Fun,
void_<
invoke<Fun, State, Head>>>
1030 : fold_<list<List...>, invoke<Fun, State, Head>, Fun>
1042 template <
typename List,
typename State,
typename Fun>
1049 template <
typename List,
typename State,
typename Fun>
1056 template <
typename List,
typename State,
typename Fun>
1061 template <
typename List,
typename State,
typename Fun>
1070 template <
typename,
typename,
typename,
typename =
void>
1071 struct reverse_fold_
1075 template <
typename State,
typename Fun>
1076 struct reverse_fold_<list<>, State, Fun>
1081 template <
typename Head,
typename... List,
typename State,
typename Fun>
1082 struct reverse_fold_<list<Head, List...>, State, Fun,
1083 void_<
_t<reverse_fold_<list<List...>, State, Fun>>>>
1084 :
lazy::invoke<Fun, _t<reverse_fold_<list<List...>, State, Fun>>, Head>
1096 template <
typename List,
typename State,
typename Fun>
1103 template <
typename List,
typename State,
typename Fun>
1118 template <
typename... Ts>
1131 template <
typename List>
1138 template <
typename List>
1147 template <
typename... Lists>
1155 using type = list<>;
1158 template <
typename... List1>
1159 struct concat_<list<List1...>>
1161 using type = list<List1...>;
1164 template <
typename... List1,
typename... List2>
1165 struct concat_<list<List1...>, list<List2...>>
1167 using type = list<List1..., List2...>;
1170 template <
typename... List1,
typename... List2,
typename... List3>
1171 struct concat_<list<List1...>, list<List2...>, list<List3...>>
1173 using type = list<List1..., List2..., List3...>;
1176 template <
typename... List1,
typename... List2,
typename... List3,
typename... Rest>
1177 struct concat_<list<List1...>, list<List2...>, list<List3...>, Rest...>
1178 : concat_<list<List1..., List2..., List3...>, Rest...>
1189 template <
typename... Lists>
1196 template <
typename... Lists>
1207 template <
typename ListOfLists>
1214 template <
typename ListOfLists>
1223 template <std::
size_t N,
typename T>
1226 using type =
concat<
_t<repeat_n_c_<N / 2, T>>,
_t<repeat_n_c_<N / 2, T>>,
1230 template <
typename T>
1231 struct repeat_n_c_<0, T>
1233 using type = list<>;
1236 template <
typename T>
1237 struct repeat_n_c_<1, T>
1239 using type = list<T>;
1248 template <
typename N,
typename T =
void>
1255 template <std::
size_t N,
typename T =
void>
1262 template <
typename N,
typename T =
void>
1271 template <
typename Vo
idPtrs>
1274 template <
typename... VoidPtrs>
1275 struct at_impl_<list<VoidPtrs...>>
1277 static nil_ eval(...);
1279 template <
typename T,
typename... Us>
1280 static T eval(VoidPtrs..., T *, Us *...);
1283 template <
typename List,
typename N>
1288 template <
typename... Ts,
typename N>
1289 struct at_<list<Ts...>, N>
1290 : decltype(at_impl_<repeat_n<N, void *>>::eval(detail::_nullptr_v<id<Ts>>()...))
1302 template <
typename List,
typename N>
1309 template <
typename List, std::
size_t N>
1316 template <
typename List,
typename N>
1327 template <
typename Vo
idPtrs>
1330 static nil_ eval(...);
1333 template <
typename... VoidPtrs>
1334 struct drop_impl_<list<VoidPtrs...>>
1336 static nil_ eval(...);
1338 template <
typename... Ts>
1339 static id<list<Ts...>> eval(VoidPtrs..., id<Ts> *...);
1343 struct drop_impl_<list<>>
1345 template <
typename...Ts>
1346 static id<list<Ts...>> eval(id<Ts> *...);
1349 template <
typename List,
typename N>
1354 template <
typename... Ts,
typename N>
1355 struct drop_<list<Ts...>, N>
1356 : decltype(drop_impl_<repeat_n<N, void *>>::eval(detail::_nullptr_v<id<Ts>>()...))
1366 template <
typename List,
typename N>
1373 template <
typename List, std::
size_t N>
1380 template <
typename List,
typename N>
1389 template <
typename List>
1394 template <
typename Head,
typename... List>
1395 struct front_<list<Head, List...>>
1406 template <
typename List>
1413 template <
typename List>
1422 template <
typename List>
1427 template <
typename Head,
typename... List>
1428 struct back_<list<Head, List...>>
1430 using type =
at_c<list<Head, List...>,
sizeof...(List)>;
1439 template <
typename List>
1446 template <
typename List>
1455 template <
typename List,
typename T>
1460 template <
typename... List,
typename T>
1461 struct push_front_<list<List...>, T>
1463 using type = list<T, List...>;
1472 template <
typename List,
typename T>
1479 template <
typename List,
typename T>
1488 template <
typename List>
1493 template <
typename Head,
typename... List>
1494 struct pop_front_<list<Head, List...>>
1496 using type = list<List...>;
1505 template <
typename List>
1512 template <
typename List>
1521 template <
typename List,
typename T>
1526 template <
typename... List,
typename T>
1527 struct push_back_<list<List...>, T>
1529 using type = list<List..., T>;
1540 template <
typename List,
typename T>
1547 template <
typename List,
typename T>
1553 template <
typename T,
typename U>
1556 template <
typename T,
typename U>
1563 template <
typename... Ts>
1568 template <
typename... Ts>
1575 template <
typename... Ts>
1580 template <
typename... Ts>
1591 template <
typename List>
1598 template <
typename List>
1606 template <
typename F,
typename S>
1611 template <
typename Pair>
1616 template <
typename Pair>
1623 template <
typename Pair>
1628 template <
typename Pair>
1638 constexpr
std::size_t find_index_i_(
bool const *
const first,
bool const *
const last,
1641 return first == last ? npos::value : *first ? N
1642 : find_index_i_(first + 1, last, N + 1);
1645 template <
typename List,
typename T>
1650 template <
typename V>
1651 struct find_index_<list<>, V>
1656 template <
typename... T,
typename V>
1657 struct find_index_<list<T...>, V>
1659 static constexpr
bool s_v[] = {std::is_same<T, V>::value...};
1660 using type =
size_t<find_index_i_(s_v, s_v +
sizeof...(T))>;
1671 template <
typename List,
typename T>
1678 template <
typename List,
typename T>
1688 constexpr
std::size_t reverse_find_index_i_(
bool const *
const first,
1691 return first == last
1693 : *(last - 1) ? N - 1 : reverse_find_index_i_(first, last - 1, N - 1);
1696 template <
typename List,
typename T>
1697 struct reverse_find_index_
1701 template <
typename V>
1702 struct reverse_find_index_<list<>, V>
1707 template <
typename... T,
typename V>
1708 struct reverse_find_index_<list<T...>, V>
1710 static constexpr
bool s_v[] = {std::is_same<T, V>::value...};
1711 using type =
size_t<reverse_find_index_i_(s_v, s_v +
sizeof...(T),
sizeof...(T))>;
1722 template <
typename List,
typename T>
1729 template <
typename List,
typename T>
1738 template <
typename List,
typename T,
typename State = list<>>
1739 struct reverse_find_
1743 template <
typename T,
typename State>
1744 struct reverse_find_<list<>, T, State>
1749 template <
typename Head,
typename... List,
typename T,
typename State>
1750 struct reverse_find_<list<Head, List...>, T, State>
1751 : reverse_find_<list<List...>, T, State>
1755 template <
typename... List,
typename T,
typename State>
1756 struct reverse_find_<list<T, List...>, T, State>
1757 : reverse_find_<list<List...>, T, list<T, List...>>
1768 template <
typename List,
typename T>
1775 template <
typename List,
typename T>
1784 template <
typename List,
typename T>
1791 template <
typename List,
typename T>
1800 template <
typename List,
typename Fun>
1805 template <
typename Fun>
1806 struct find_if_<list<>, Fun>
1808 using type = list<>;
1811 template <
typename Head,
typename... List,
typename Fun>
1812 struct find_if_<list<Head, List...>, Fun>
1813 :
if_<invoke<Fun, Head>, id<list<Head, List...>>, find_if_<list<List...>, Fun>>
1825 template <
typename List,
typename Fun>
1832 template <
typename List,
typename Fun>
1841 template <
typename List,
typename Fun,
typename State = list<>>
1842 struct reverse_find_if_
1846 template <
typename Fun,
typename State>
1847 struct reverse_find_if_<list<>, Fun, State>
1852 template <
typename Head,
typename... List,
typename Fun,
typename State>
1853 struct reverse_find_if_<list<Head, List...>, Fun, State>
1854 : reverse_find_if_<list<List...>, Fun,
1855 if_<invoke<Fun, Head>, list<Head, List...>, State>>
1867 template <
typename List,
typename Fun>
1874 template <
typename List,
typename Fun>
1883 template <
typename List,
typename T,
typename U>
1888 template <
typename... List,
typename T,
typename U>
1889 struct replace_<list<List...>, T, U>
1891 using type = list<if_<std::is_same<T, List>, U, List>...>;
1901 template <
typename List,
typename T,
typename U>
1908 template <
typename List,
typename T,
typename U>
1917 template <
typename List,
typename C,
typename U>
1922 template <
typename... List,
typename C,
typename U>
1923 struct replace_if_<list<List...>, C, U>
1925 using type = list<if_<invoke<C, List>, U, List>...>;
1935 template <
typename List,
typename C,
typename U>
1942 template <
typename List,
typename C,
typename U>
1950 template <
typename State,
typename Val,
typename T>
1958 template <
typename List,
typename T>
1965 template <
typename List,
typename T>
1973 template <
typename State,
typename Val,
typename Fn>
1982 template <
typename List,
typename Fn>
1989 template <
typename List,
typename Fn>
1998 template <
typename,
typename =
void>
2003 template <
typename... Ts,
typename Fun>
2004 struct transform_<list<list<Ts...>, Fun>,
void_<
invoke<Fun, Ts>...>>
2006 using type = list<invoke<Fun, Ts>...>;
2009 template <
typename... Ts0,
typename... Ts1,
typename Fun>
2010 struct transform_<list<list<Ts0...>, list<Ts1...>, Fun>,
2013 using type = list<invoke<Fun, Ts0, Ts1>...>;
2026 template <
typename... Args>
2033 template <
typename... Args>
2042 template <
typename Pred>
2045 template <
typename State,
typename A>
2057 template <
typename List,
typename Pred>
2064 template <
typename List,
typename Pred>
2073 template <
typename T>
2076 static constexpr T value{};
2080 template <
typename T>
2081 constexpr T static_const<T>::value;
2093 template <
class UnaryFunction,
class... Args>
2094 constexpr
auto operator()(list<Args...>, UnaryFunction f)
const -> UnaryFunction
2096 return (
void)std::initializer_list<int>{((void)f(Args{}), 0)...}, f;
2110 constexpr
auto &&
for_each = detail::static_const<detail::for_each_fn>::value;
2123 template <
typename ListOfLists>
2124 using transpose = fold<ListOfLists, repeat_n<size<front<ListOfLists>>, list<>>,
2131 template <
typename ListOfLists>
2143 template <
typename Fun,
typename ListOfLists>
2150 template <
typename Fun,
typename ListOfLists>
2162 template <
typename ListOfLists>
2169 template <
typename ListOfLists>
2178 template <
typename T>
2183 template <
typename Sequence>
2184 struct as_list_ :
lazy::invoke<uncurry<curry<quote_trait<id>>>, uncvref_t<Sequence>>
2193 template <
typename Sequence>
2200 template <
typename Sequence>
2210 template <
typename List>
2217 template <
typename List>
2223 template <
typename F>
2230 template <
typename F>
2241 template <
typename List,
typename F>
2248 template <
typename List,
typename Fn>
2259 template <
typename List,
typename F>
2266 template <
typename List,
typename Fn>
2277 template <
typename List,
typename F>
2284 template <
typename List,
typename Fn>
2295 template <
typename List,
typename T>
2302 template <
typename List,
typename T>
2311 template<
typename List>
2316 template<
typename ...List>
2317 struct inherit_<list<List...>> : List...
2319 using type = inherit_;
2328 template <
typename List>
2335 template <
typename List>
2345 template <
typename Set,
typename T>
2350 template <
typename... Set,
typename T>
2351 struct in_<list<Set...>, T> : std::is_base_of<id<T>, inherit<list<id<Set>...>>>
2355 template <
typename Set,
typename T>
2360 template <
typename... Set,
typename T>
2361 struct insert_back_<list<Set...>, T>
2363 using type =
if_<in_<list<Set...>, T>, list<Set...>, list<Set..., T>>;
2374 template <
typename List>
2381 template <
typename List>
2390 template <
typename Pred>
2393 template <
typename,
typename,
typename =
void>
2397 template <
typename... Yes,
typename... No,
typename A>
2398 struct impl<pair<list<Yes...>, list<No...>>, A,
2399 void_<bool_<invoke<Pred, A>::type::value>>>
2402 pair<list<Yes...>, list<No..., A>>>;
2404 template <
typename State,
typename A>
2416 template <
typename List,
typename Pred>
2423 template <
typename List,
typename Pred>
2432 template <
typename,
typename,
typename =
void>
2437 template <
typename Pred>
2438 struct sort_<list<>, Pred>
2440 using type = list<>;
2443 template <
typename A,
typename Pred>
2444 struct sort_<list<A>, Pred>
2446 using type = list<A>;
2449 template <
typename A,
typename B,
typename... List,
typename Pred>
2451 list<A, B, List...>, Pred,
2454 using P =
partition<list<B, List...>, bind_back<Pred, A>>;
2456 concat<_t<sort_<first<P>, Pred>>, list<A>, _t<sort_<second<P>, Pred>>>;
2473 template <
typename List,
typename Pred>
2480 template <
typename List,
typename Pred>
2489 template <
typename T,
int = 0>
2492 template <
typename,
int = 0>
2495 template <
typename T,
int = 0>
2499 template <
typename If,
typename... Ts>
2502 template <
typename A,
typename T,
typename F,
typename Ts>
2507 template <
typename T,
typename F,
typename Ts>
2508 struct subst1_<F, T, F, Ts>
2510 using type = list<>;
2512 template <
typename A,
typename T,
typename F,
typename Ts>
2513 struct subst1_<vararg_<A>, T, F, Ts>
2515 using type = list<Ts>;
2518 template <
typename As,
typename Ts>
2521 concat<As, repeat_n_c<size<Ts>{} + 2 - size<As>{}, back<As>>>,
2522 concat<Ts, repeat_n_c<2, back<As>>>,
2523 bind_back<quote_trait<subst1_>, back<As>, drop_c<Ts, size<As>{} - 2>>>>,
2526 template <
typename As,
typename Ts>
2527 using substitutions =
2528 invoke<if_c<(size<Ts>{} + 2 >= size<As>{}), quote<substitutions_>>, As, Ts>;
2530 template <
typename T>
2531 struct is_vararg_ : std::false_type
2534 template <
typename T>
2535 struct is_vararg_<vararg_<T>> : std::true_type
2539 template <
typename Tags>
2540 using is_variadic_ = is_vararg_<at<push_front<Tags, void>, dec<size<Tags>>>>;
2542 template <typename Tags, bool IsVariadic = is_variadic_<Tags>::value>
2546 template <
typename... As>
2547 struct lambda_<list<As...>, false>
2550 static constexpr
std::size_t arity =
sizeof...(As)-1;
2551 using Tags = list<As...>;
2552 using F = back<Tags>;
2553 template <
typename T,
typename Args>
2555 template <
typename T,
typename Args>
2556 using lazy_impl_ = lazy::_t<defer<impl, T, protect_<Args>>>;
2557 template <
typename,
typename,
typename =
void>
2561 template <
template <
typename...>
class C,
typename... Ts,
typename Args>
2562 struct subst_<defer<C, Ts...>, Args,
void_<C<
_t<impl<Ts, Args>>...>>>
2564 using type = C<_t<impl<Ts, Args>>...>;
2566 template <
typename T,
template <T...>
class C, T... Is,
typename Args>
2567 struct subst_<defer_i<T, C, Is...>, Args,
void_<C<Is...>>>
2569 using type = C<Is...>;
2571 template <
typename T,
typename Args>
2572 struct impl :
if_c<(reverse_find_index<Tags, T>() != npos()),
2573 lazy::at<Args, reverse_find_index<Tags, T>>, id<T>>
2576 template <
typename T,
typename Args>
2577 struct impl<protect_<T>, Args>
2581 template <
typename T,
typename Args>
2582 struct impl<is_valid_<T>, Args>
2584 using type = is_trait<impl<T, Args>>;
2586 template <
typename If,
typename... Ts,
typename Args>
2587 struct impl<defer<
if_, If, Ts...>, Args>
2588 : impl<lazy_impl_<lazy_if_<If, Ts...>, Args>, Args>
2591 template <
typename Bool,
typename... Ts,
typename Args>
2592 struct impl<defer<
and_, Bool, Ts...>, Args>
2593 : impl<lazy_impl_<lazy_if_<Bool, lazy::and_<Ts...>, protect_<std::false_type>>,
2598 template <
typename Bool,
typename... Ts,
typename Args>
2599 struct impl<defer<
or_, Bool, Ts...>, Args>
2600 : impl<lazy_impl_<lazy_if_<Bool, protect_<std::true_type>, lazy::or_<Ts...>>,
2605 template <
template <
typename...>
class C,
typename... Ts,
typename Args>
2606 struct impl<defer<C, Ts...>, Args> : subst_<defer<C, Ts...>, Args>
2609 template <
typename T,
template <T...>
class C, T... Is,
typename Args>
2610 struct impl<defer_i<T, C, Is...>, Args> : subst_<defer_i<T, C, Is...>, Args>
2613 template <
template <
typename...>
class C,
typename... Ts,
typename Args>
2614 struct impl<C<Ts...>, Args> : subst_<defer<C, Ts...>, Args>
2617 template <
typename... Ts,
typename Args>
2618 struct impl<lambda_<list<Ts...>, false>, Args>
2620 using type =
compose<
uncurry<lambda_<list<As..., Ts...>,
false>>,
2621 curry<bind_front<quote<concat>, Args>>>;
2623 template <
typename... Bs,
typename Args>
2624 struct impl<lambda_<list<Bs...>, true>, Args>
2626 using type =
compose<
typename lambda_<list<As..., Bs...>,
true>::thunk,
2627 bind_front<quote<concat>, transform<Args, quote<list>>>,
2628 curry<bind_front<quote<substitutions>, list<Bs...>>>>;
2632 template <
typename... Ts>
2633 using invoke =
_t<
if_c<
sizeof...(Ts) == arity, impl<F, list<Ts..., F>>>>;
2638 template <
typename... As>
2639 struct lambda_<list<As...>, true>
2642 template <
typename T,
bool IsVar>
2643 friend struct lambda_;
2644 using Tags = list<As...>;
2645 template <
typename T,
typename Args>
2647 template <
typename Args>
2648 using eval_impl_ = bind_back<quote_trait<impl>, Args>;
2649 template <
typename T,
typename Args>
2650 using lazy_impl_ = lazy::_t<defer<impl, T, protect_<Args>>>;
2651 template <
template <
typename...>
class C,
typename Args,
typename Ts>
2652 using try_subst_ = apply<quote<C>, join<transform<Ts, eval_impl_<Args>>>>;
2653 template <
typename,
typename,
typename =
void>
2657 template <
template <
typename...>
class C,
typename... Ts,
typename Args>
2658 struct subst_<defer<C, Ts...>, Args,
void_<try_subst_<C, Args, list<Ts...>>>>
2660 using type = list<try_subst_<C, Args, list<Ts...>>>;
2662 template <
typename T,
template <T...>
class C, T... Is,
typename Args>
2663 struct subst_<defer_i<T, C, Is...>, Args,
void_<C<Is...>>>
2665 using type = list<C<Is...>>;
2667 template <
typename T,
typename Args>
2668 struct impl :
if_c<(reverse_find_index<Tags, T>() != npos()),
2669 lazy::at<Args, reverse_find_index<Tags, T>>, id<list<T>>>
2672 template <
typename T,
typename Args>
2673 struct impl<protect_<T>, Args>
2675 using type = list<T>;
2677 template <
typename T,
typename Args>
2678 struct impl<is_valid_<T>, Args>
2680 using type = list<is_trait<impl<T, Args>>>;
2682 template <
typename If,
typename... Ts,
typename Args>
2683 struct impl<defer<
if_, If, Ts...>, Args>
2684 : impl<lazy_impl_<lazy_if_<If, Ts...>, Args>, Args>
2687 template <
typename Bool,
typename... Ts,
typename Args>
2688 struct impl<defer<
and_, Bool, Ts...>, Args>
2689 : impl<lazy_impl_<lazy_if_<Bool, lazy::and_<Ts...>, protect_<std::false_type>>,
2694 template <
typename Bool,
typename... Ts,
typename Args>
2695 struct impl<defer<
or_, Bool, Ts...>, Args>
2696 : impl<lazy_impl_<lazy_if_<Bool, protect_<std::true_type>, lazy::or_<Ts...>>,
2701 template <
template <
typename...>
class C,
typename... Ts,
typename Args>
2702 struct impl<defer<C, Ts...>, Args> : subst_<defer<C, Ts...>, Args>
2705 template <
typename T,
template <T...>
class C, T... Is,
typename Args>
2706 struct impl<defer_i<T, C, Is...>, Args> : subst_<defer_i<T, C, Is...>, Args>
2709 template <
template <
typename...>
class C,
typename... Ts,
typename Args>
2710 struct impl<C<Ts...>, Args> : subst_<defer<C, Ts...>, Args>
2713 template <
typename... Bs,
bool IsVar,
typename Args>
2714 struct impl<lambda_<list<Bs...>, IsVar>, Args>
2717 list<
compose<
typename lambda_<list<As..., Bs...>,
true>::thunk,
2718 bind_front<quote<concat>, Args>,
2719 curry<bind_front<quote<substitutions>, list<Bs...>>>>>;
2723 template <
typename S,
typename R = _t<impl<back<Tags>, S>>>
2724 using invoke = if_c<size<R>{} == 1, front<R>>;
2728 template <
typename... Ts>
2729 using invoke = invoke<thunk, substitutions<Tags, list<Ts...>>>;
2743 template <
typename... Ts>
2750 template <
typename T>
2756 template <
typename T>
2763 template <
typename T>
2770 template <
typename Tag,
typename Value>
2776 template <
typename... As>
2780 template <
typename Fn>
2785 template <
typename Tag,
typename Value,
typename... Rest>
2786 struct let_<var<Tag, Value>, Rest...>
2808 template <
typename... As>
2815 template <
typename... As>
2821 inline namespace placeholders
2846 template <
typename M2,
typename M>
2847 struct cartesian_product_fn
2849 template <
typename X>
2852 template <
typename Xs>
2853 using lambda1 = list<push_front<Xs, X>>;
2854 using type = join<transform<M2, quote<lambda1>>>;
2856 using type = join<transform<M, quote_trait<lambda0>>>;
2867 template <
typename ListOfLists>
2875 template <
typename ListOfLists>
2882 template <
typename If>
2892 #ifndef __cpp_lib_integer_sequence
2893 template <
typename T, T... Is>
2898 using value_type = T;
2908 template <
typename I1,
typename I2,
typename I3>
2909 struct integer_sequence_cat;
2911 template <
typename T, T... N1, T... N2, T... N3>
2912 struct integer_sequence_cat<integer_sequence<T, N1...>, integer_sequence<T, N2...>,
2913 integer_sequence<T, N3...>>
2915 using type = integer_sequence<T, N1..., (
sizeof...(N1) + N2)...,
2916 (
sizeof...(N1) +
sizeof...(N2) + N3)...>;
2919 template <
typename T, std::
size_t N>
2920 struct make_integer_sequence_
2921 : integer_sequence_cat<_t<make_integer_sequence_<T, N / 2>>,
2922 _t<make_integer_sequence_<T, N / 2>>,
2923 _t<make_integer_sequence_<T, N % 2>>>
2927 template <
typename T>
2928 struct make_integer_sequence_<T, 0>
2930 using type = integer_sequence<T>;
2933 template <
typename T>
2934 struct make_integer_sequence_<T, 1>
2936 using type = integer_sequence<T, 0>;
2945 template <
typename T, T N>
2958 template <std::
size_t N>
2964 template <
typename State,
typename Ch>
2966 std::integral_constant<
typename State::value_type,
2967 State::value * 10 + (Ch::value -
'0')>>;
2971 inline namespace literals
2975 template <
char... Chs>
2987 template <
class T, T offset,
class U>
2988 struct offset_integer_sequence_
2992 template <
class T, T offset, T... Ts>
2993 struct offset_integer_sequence_<T, offset,
meta::integer_sequence<T, Ts...>>
3002 template <
class T, T from, T to>
3011 #if defined(__clang__) && defined(_LIBCPP_VERSION) && _LIBCPP_VERSION <= 1101
3013 _LIBCPP_BEGIN_NAMESPACE_STD
3015 class _LIBCPP_TYPE_VIS_ONLY allocator;
3016 template <
class,
class>
3017 struct _LIBCPP_TYPE_VIS_ONLY
pair;
3019 struct _LIBCPP_TYPE_VIS_ONLY hash;
3021 struct _LIBCPP_TYPE_VIS_ONLY
less;
3023 struct _LIBCPP_TYPE_VIS_ONLY
equal_to;
3025 struct _LIBCPP_TYPE_VIS_ONLY char_traits;
3026 template <
class,
class>
3027 class _LIBCPP_TYPE_VIS_ONLY list;
3028 template <
class,
class>
3029 class _LIBCPP_TYPE_VIS_ONLY forward_list;
3030 template <
class,
class>
3031 class _LIBCPP_TYPE_VIS_ONLY vector;
3032 template <
class,
class>
3033 class _LIBCPP_TYPE_VIS_ONLY deque;
3034 template <
class,
class,
class>
3035 class _LIBCPP_TYPE_VIS_ONLY basic_string;
3036 template <
class,
class,
class,
class>
3037 class _LIBCPP_TYPE_VIS_ONLY map;
3038 template <
class,
class,
class,
class>
3039 class _LIBCPP_TYPE_VIS_ONLY multimap;
3040 template <
class,
class,
class>
3041 class _LIBCPP_TYPE_VIS_ONLY set;
3042 template <
class,
class,
class>
3043 class _LIBCPP_TYPE_VIS_ONLY multiset;
3044 template <
class,
class,
class,
class,
class>
3045 class _LIBCPP_TYPE_VIS_ONLY unordered_map;
3046 template <
class,
class,
class,
class,
class>
3047 class _LIBCPP_TYPE_VIS_ONLY unordered_multimap;
3048 template <
class,
class,
class,
class>
3049 class _LIBCPP_TYPE_VIS_ONLY unordered_set;
3050 template <
class,
class,
class,
class>
3051 class _LIBCPP_TYPE_VIS_ONLY unordered_multiset;
3052 template <
class,
class>
3053 class _LIBCPP_TYPE_VIS_ONLY queue;
3054 template <
class,
class,
class>
3055 class _LIBCPP_TYPE_VIS_ONLY priority_queue;
3056 template <
class,
class>
3057 class _LIBCPP_TYPE_VIS_ONLY stack;
3058 _LIBCPP_END_NAMESPACE_STD
3066 template <
typename T,
typename A = std::allocator<T>>
3067 using std_list = std::list<T, A>;
3068 template <
typename T,
typename A = std::allocator<T>>
3069 using std_forward_list = std::forward_list<T, A>;
3070 template <
typename T,
typename A = std::allocator<T>>
3071 using std_vector = std::vector<T, A>;
3072 template <
typename T,
typename A = std::allocator<T>>
3073 using std_deque = std::deque<T, A>;
3074 template <
typename T,
typename C = std::
char_traits<T>,
typename A = std::allocator<T>>
3075 using std_basic_string = std::basic_string<T, C, A>;
3076 template <
typename K,
typename V,
typename C = std::less<K>,
3077 typename A = std::allocator<std::pair<K const, V>>>
3078 using std_map = std::map<K, V, C, A>;
3079 template <
typename K,
typename V,
typename C = std::less<K>,
3080 typename A = std::allocator<std::pair<K const, V>>>
3081 using std_multimap = std::multimap<K, V, C, A>;
3082 template <
typename K,
typename C = std::less<K>,
typename A = std::allocator<K>>
3083 using std_set = std::set<K, C, A>;
3084 template <
typename K,
typename C = std::less<K>,
typename A = std::allocator<K>>
3085 using std_multiset = std::multiset<K, C, A>;
3086 template <
typename K,
typename V,
typename H = std::hash<K>,
3087 typename C = std::equal_to<K>,
3088 typename A = std::allocator<std::pair<K const, V>>>
3089 using std_unordered_map = std::unordered_map<K, V, H, C, A>;
3090 template <
typename K,
typename V,
typename H = std::hash<K>,
3091 typename C = std::equal_to<K>,
3092 typename A = std::allocator<std::pair<K const, V>>>
3093 using std_unordered_multimap = std::unordered_multimap<K, V, H, C, A>;
3094 template <
typename K,
typename H = std::hash<K>,
typename C = std::equal_to<K>,
3095 typename A = std::allocator<K>>
3096 using std_unordered_set = std::unordered_set<K, H, C, A>;
3097 template <
typename K,
typename H = std::hash<K>,
typename C = std::equal_to<K>,
3098 typename A = std::allocator<K>>
3099 using std_unordered_multiset = std::unordered_multiset<K, H, C, A>;
3100 template <
typename T,
typename C = std_deque<T>>
3101 using std_queue = std::queue<T, C>;
3102 template <
typename T,
typename C = std_vector<T>,
3103 class D = std::less<
typename C::value_type>>
3104 using std_priority_queue = std::priority_queue<T, C, D>;
3105 template <
typename T,
typename C = std_deque<T>>
3106 using std_stack = std::stack<T, C>;
3110 struct quote<::std::list> : quote<detail::std_list>
3114 struct quote<::std::deque> : quote<detail::std_deque>
3118 struct quote<::std::forward_list> : quote<detail::std_forward_list>
3122 struct quote<::std::vector> : quote<detail::std_vector>
3126 struct quote<::std::basic_string> : quote<detail::std_basic_string>
3130 struct quote<::std::map> : quote<detail::std_map>
3134 struct quote<::std::multimap> : quote<detail::std_multimap>
3138 struct quote<::std::set> : quote<detail::std_set>
3142 struct quote<::std::multiset> : quote<detail::std_multiset>
3146 struct quote<::std::unordered_map> : quote<detail::std_unordered_map>
3150 struct quote<::std::unordered_multimap> : quote<detail::std_unordered_multimap>
3154 struct quote<::std::unordered_set> : quote<detail::std_unordered_set>
3158 struct quote<::std::unordered_multiset> : quote<detail::std_unordered_multiset>
3162 struct quote<::std::queue> : quote<detail::std_queue>
3166 struct quote<::std::priority_queue> : quote<detail::std_priority_queue>
3170 struct quote<::std::stack> : quote<detail::std_stack>
3179 #if defined(__clang__)
3180 #pragma GCC diagnostic pop
bool_< 0==size< List >::type::value > empty
An Boolean integral constant wrapper around true if List is an empty type list; false, otherwise.
and_c< Bools::type::value... > strict_and
Logically and together all the integral constant-wrapped Boolean parameters, without doing short-circ...
_t< id< T >> id_t
An alias for type T. Useful in non-deduced contexts.
at< List, meta::size_t< N >> at_c
Return the N th element in the meta::list List.
std::integral_constant< decltype(T::type::value-U::type::value), T::type::value-U::type::value > minus
An integral constant wrapper around the result of subtracting the two wrapped integers T::type::value...
_t< detail::_and_< Bools... >> and_
Logically and together all the integral constant-wrapped Boolean parameters, with short-circuiting...
defer< bind_front, Fn, Ts... > bind_front
fold< pop_front< list< Ts... >>, front< list< Ts... >>, quote< detail::max_ >> max
An integral constant wrapper around the maximum of Ts::type::value...
bool_<(T::type::value > U::type::value)> greater
A Boolean integral constant wrapper around true if T::type::value is greater than U::type::value; fal...
make_integer_sequence< std::size_t, N > make_index_sequence
Generate index_sequence containing integer constants [0,1,2,...,N-1].
_t< detail::find_index_< List, T >> find_index
Finds the index of the first occurrence of the type T within the list List. Returns meta::npos if the...
if_c<(sizeof...(Ts) > 0), detail::lambda_< list< Ts... >>> lambda
For creating anonymous Callables.
bool_< T::type::value==U::type::value > equal_to
A Boolean integral constant wrapper around the result of comparing T::type::value and U::type::value ...
std::integral_constant< decltype(T::type::value *U::type::value), T::type::value *U::type::value > multiplies
An integral constant wrapper around the result of multiplying the two wrapped integers T::type::value...
fold< List, meta::size_t< 0 >, bind_back< quote< detail::count_fn >, T >> count
Count the number of times a type T appears in the list List.
defer< equal_to, T, U > equal_to
_t< _t< detail::let_< As... >>> let
A lexically scoped expression with local variables.
_t< detail::as_list_< Sequence >> as_list
Turn a type into an instance of meta::list in a way determined by meta::invoke.
std::integral_constant< decltype(T::type::value^U::type::value), T::type::value^U::type::value > bit_xor
An integral constant wrapper around the result of bitwise-exclusive-or'ing the two wrapped integers T...
std::integral_constant< decltype(T::type::value%U::type::value), T::type::value%U::type::value > modulus
An integral constant wrapper around the remainder of dividing the two wrapped integers T::type::value...
_t< detail::_if_< Args... >> if_
Select one type or another depending on a compile-time Boolean.
fold< pop_front< list< Ts... >>, front< list< Ts... >>, quote< detail::min_ >> min
An integral constant wrapper around the minimum of Ts::type::value...
typename F::template invoke< Args... > invoke
Evaluate the Callable F with the arguments Args.
constexpr auto && for_each
for_each(List, UnaryFunction) calls the UnaryFunction for each argument in the List.
_t< detail::reverse_find_index_< List, T >> reverse_find_index
Finds the index of the last occurrence of the type T within the list List. Returns meta::npos if the ...
list< F, S > pair
A list with exactly two elements.
defer< compose, Fns... > compose
_t< detail::_if_< bool_< If >, Args... >> if_c
Select one type or another depending on a compile-time Boolean.
meta::size_t< alignof(T)> alignof_
An alias that computes the alignment required for any instance of the type T.
_t< detail::front_< List >> front
Return the first element in meta::list List.
std::is_same< integer_sequence< bool, Bools... >, integer_sequence< bool,(Bools||true)... >> and_c
Logically and together all the Boolean parameters.
meta::_t< detail::inherit_< List >> inherit
A type that inherits from all the types in the list.
front< Pair > first
Retrieve the first element of the pair Pair.
not_< empty< find< List, T >>> in
A Boolean integral constant wrapper around true if there is at least one occurrence of T in List...
bool_< T::type::value!=U::type::value > not_equal_to
A Boolean integral constant wrapper around the result of comparing T::type::value and U::type::value ...
meta::_t< detail::offset_integer_sequence_< T, from, meta::make_integer_sequence< T, to-from >>> integer_range
Makes the integer sequence [from, to).
defer< bind_back, Fn, Ts... > bind_back
compose< quote< _t >, quote_i< T, C >> quote_trait_i
Turn a trait C taking literals of type T into a Callable.
std::integral_constant< decltype(~T::type::value),~T::type::value > bit_not
An integral constant wrapper around the result of bitwise-complementing the wrapped integer T::type::...
std::integral_constant< bool, B > bool_
An integral constant wrapper for bool.
_t< detail::at_< List, N >> at
Return the N th element in the meta::list List.
detail::is_valid_< T > is_valid
For testing whether a deferred computation will succeed in a let or a lambda.
empty< find_if< List, F >> none_of
A Boolean integral constant wrapper around true if invoke::value is false for all elements A in...
meta::size_t< List::size()> size
An integral constant wrapper that is the size of the meta::list List.
not_c< Bool::type::value > not_
Logically negate the integral constant-wrapped Boolean parameter.
bool_<(T::type::value<=U::type::value)> less_equal
A Boolean integral constant wrapper around true if T::type::value is less than or equal to U::type::v...
bool_<(T::type::value< U::type::value)> less
A Boolean integral constant wrapper around true if T::type::value is less than U::type::value; false...
_t< detail::find_if_< List, Fun >> find_if
Return the tail of the list List starting at the first element A such that invoke::value is true, if any such element exists; the empty list, otherwise.
bool_<(T::type::value >=U::type::value)> greater_equal
A Boolean integral constant wrapper around true if T::type::value is greater than or equal to U::type...
std::integral_constant< std::size_t, N > size_t
An integral constant wrapper for std::size_t.
_t< detail::is_callable_< T >> is_callable
An alias for std::true_type if T::invoke exists and names a class template or alias template; otherwi...
std::integral_constant< decltype(T::type::value+U::type::value), T::type::value+U::type::value > plus
An integral constant wrapper around the result of adding the two wrapped integers T::type::value and ...
not_< empty< find_if< List, F >>> any_of
A Boolean integral constant wrapper around true if invoke::value is true for any element A in m...
_t< extension::apply< C, List >> apply
Applies the Callable C using the types in the type list List as arguments.
std::integral_constant< decltype(T::type::value &U::type::value), T::type::value &U::type::value > bit_and
An integral constant wrapper around the result of bitwise-and'ing the two wrapped integers T::type::v...
std::integral_constant< decltype(-T::type::value),-T::type::value > negate
An integral constant wrapper around the result of negating the wrapped integer T::type::value.
_t< detail::is_trait_< T >> is_trait
An alias for std::true_type if T::type exists and names a type; otherwise, it's an alias for std::fal...
meta::size_t< std::size_t(-1)> npos
A special value used to indicate no matches. It equals the maximum value representable by std::size_t...
detail::on_< Fs... > on
Use as on. Creates an Callable that applies Callable F to the result of applying Callable c...
not_< std::is_same< integer_sequence< bool, Bools... >, integer_sequence< bool,(Bools &&false)... >>> or_c
Logically or together all the Boolean parameters.
bind_front< quote< apply >, F > uncurry
A Callable that takes a type list, unpacks the types, and then calls the Callable F with the types...
empty< find_if< List, not_fn< F >>> all_of
A Boolean integral constant wrapper around true if invoke::value is true for all elements A in ...
meta::size_t< sizeof(T)> sizeof_
An alias that computes the size of the type T.
front< pop_front< Pair >> second
Retrieve the first element of the pair Pair.
constexpr T::type::value_type _v
Variable alias for T::type::value.
_t< detail::make_integer_sequence_< T,(std::size_t) N >> make_integer_sequence
Generate integer_sequence containing integer constants [0,1,2,...,N-1].
_t< detail::is_< T, C >> is
is
_t< detail::repeat_n_c_< N::type::value, T >> repeat_n
Generate list of size N arguments.
defer< invoke, F, Args... > invoke
_t< detail::reverse_find_if_< List, Fun >> reverse_find_if
Return the tail of the list List starting at the last element A such that invoke::value is true, if any such element exists; the empty list, otherwise.
std::integral_constant< decltype(T::type::value|U::type::value), T::type::value|U::type::value > bit_or
An integral constant wrapper around the result of bitwise-or'ing the two wrapped integers T::type::va...
fold< List, pair< list<>, list<>>, detail::partition_< Pred >> partition
Returns a pair of lists, where the elements of List that satisfy the Callable Pred such that invoke
_t< detail::_or_< Bools... >> or_
Logically or together all the integral constant-wrapped Boolean parameters, with short-circuiting.
fold< List, meta::size_t< 0 >, bind_back< quote< detail::count_if_fn >, Fn >> count_if
Count the number of times the predicate Fn evaluates to true for all the elements in the list List...
or_c< Bools::type::value... > strict_or
Logically or together all the integral constant-wrapped Boolean parameters, without doing short-circu...
std::integral_constant< char, Ch > char_
An integral constant wrapper for char.
drop< List, min< find_index< List, T >, size< List >>> find
Return the tail of the list List starting at the first occurrence of T, if any such element exists; t...
invoke< id< void >, Ts... > void_
An alias for void.
_t< detail::back_< List >> back
Return the last element in meta::list List.
typename T::type _t
Type alias for T::type.
std::integral_constant< int, I > int_
An integral constant wrapper for int.
drop< List, min< reverse_find_index< List, T >, size< List >>> reverse_find
Return the tail of the list List starting at the last occurrence of T, if any such element exists; th...
std::integral_constant< decltype(T::type::value/U::type::value), T::type::value/U::type::value > divides
An integral constant wrapper around the result of dividing the two wrapped integers T::type::value an...
_t< detail::repeat_n_c_< N, T >> repeat_n_c
Generate list of size N arguments.
bool_<!Bool > not_c
Logically negate the Boolean parameter.