Commit 4d67fb53 authored by Matthias Vallentin's avatar Matthias Vallentin

Bring back lost meta function

parent e7c9dcf5
...@@ -501,7 +501,7 @@ struct tl_binary_forall { ...@@ -501,7 +501,7 @@ struct tl_binary_forall {
// Uncomment after having switched to C++14 // Uncomment after having switched to C++14
//template <class ListA, class ListB, template <class, class> class Pred> //template <class ListA, class ListB, template <class, class> class Pred>
//inline constexpr bool tl_binary_forall_v //inline constexpr bool tl_binary_forall_v
// = tl_binary_forall<ListA, ListB, Pred>::value; // = tl_binary_forall<ListA, ListB, Pred>::value;
/// Tests whether a predicate holds for some of the elements of a list. /// Tests whether a predicate holds for some of the elements of a list.
...@@ -511,6 +511,11 @@ struct tl_exists { ...@@ -511,6 +511,11 @@ struct tl_exists {
Pred<tl_head_t<List>>::value || tl_exists<tl_tail_t<List>, Pred>::value; Pred<tl_head_t<List>>::value || tl_exists<tl_tail_t<List>, Pred>::value;
}; };
template <template <class> class Pred>
struct tl_exists<empty_type_list, Pred> {
static constexpr bool value = false;
};
// Uncomment after having switched to C++14 // Uncomment after having switched to C++14
//template <class List, template <class> class Pred> //template <class List, template <class> class Pred>
//inline constexpr bool tl_exists_v = tl_exists<List, Pred>::value; //inline constexpr bool tl_exists_v = tl_exists<List, Pred>::value;
...@@ -733,7 +738,7 @@ struct tl_replace_back<type_list<T>, Back, type_list<Us...>> { ...@@ -733,7 +738,7 @@ struct tl_replace_back<type_list<T>, Back, type_list<Us...>> {
}; };
template <class List, class Back, class Intermediate = type_list<>> template <class List, class Back, class Intermediate = type_list<>>
using tl_replace_back_t using tl_replace_back_t
= typename tl_replace_back<List, Back, Intermediate>::type; = typename tl_replace_back<List, Back, Intermediate>::type;
// type at(size_t) // type at(size_t)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment