Query and search algorithms More...
Topics | |
lazy | |
Typedefs | |
template<list_like L, invocable Fn> | |
using | meta::all_of = empty<find_if<L, not_fn<Fn>>> |
A Boolean integral constant wrapper around true if invoke<Fn, A>::value is true for all elements A in meta::list L ; false , otherwise. | |
template<list_like L, invocable Fn> | |
using | meta::any_of = not_<empty<find_if<L, Fn>>> |
A Boolean integral constant wrapper around true if invoke<Fn, A>::value is true for any element A in meta::list L ; false , otherwise. | |
template<list_like L, typename T > | |
using | meta::count = _t<detail::count_<L, T>> |
Count the number of times a type T appears in the list L . | |
template<list_like L, invocable Fn> | |
using | meta::count_if = _t<detail::count_if_<L, Fn>> |
Count the number of times the predicate Fn evaluates to true for all the elements in the list L . | |
template<list_like L, typename T > | |
using | meta::find = drop<L, min<find_index<L, T>, size<L>>> |
Return the tail of the list L starting at the first occurrence of T , if any such element exists; the empty list, otherwise. | |
template<list_like L, invocable Fn> | |
using | meta::find_if = _t<detail::find_if_<L, Fn>> |
Return the tail of the list L starting at the first element A such that invoke<Fn, A>::value is true , if any such element exists; the empty list, otherwise. | |
template<list_like L, typename T > | |
using | meta::find_index = _t<detail::find_index_<L, T>> |
Finds the index of the first occurrence of the type T within the list L . Returns #meta::npos if the type T was not found. | |
template<list_like L, typename T > | |
using | meta::in = not_<empty<find<L, T>>> |
A Boolean integral constant wrapper around true if there is at least one occurrence of T in L . | |
template<list_like L, invocable Fn> | |
using | meta::none_of = empty<find_if<L, Fn>> |
A Boolean integral constant wrapper around true if invoke<Fn, A>::value is false for all elements A in meta::list L ; false , otherwise. | |
template<list_like L, typename T > | |
using | meta::reverse_find = drop<L, min<reverse_find_index<L, T>, size<L>>> |
Return the tail of the list L starting at the last occurrence of T , if any such element exists; the empty list, otherwise. | |
template<list_like L, invocable Fn> | |
using | meta::reverse_find_if = _t<detail::reverse_find_if_<L, Fn>> |
Return the tail of the list L starting at the last element A such that invoke<Fn, A>::value is true , if any such element exists; the empty list, otherwise. | |
template<list_like L, typename T > | |
using | meta::reverse_find_index = _t<detail::reverse_find_index_<L, T>> |
Finds the index of the last occurrence of the type T within the list L . Returns #meta::npos if the type T was not found. | |
Query and search algorithms
using meta::all_of = empty<find_if<L, not_fn<Fn>>> |
#include <meta/meta.hpp>
A Boolean integral constant wrapper around true
if invoke<Fn, A>::value
is true
for all elements A
in meta::list
L
; false
, otherwise.
O(N)
. using meta::any_of = not_<empty<find_if<L, Fn>>> |
#include <meta/meta.hpp>
A Boolean integral constant wrapper around true
if invoke<Fn, A>::value
is true
for any element A
in meta::list
L
; false
, otherwise.
O(N)
. using meta::count = _t<detail::count_<L, T>> |
using meta::count_if = _t<detail::count_if_<L, Fn>> |
#include <meta/meta.hpp>
Count the number of times the predicate Fn
evaluates to true for all the elements in the list L
.
O(N)
. using meta::find = drop<L, min<find_index<L, T>, size<L>>> |
#include <meta/meta.hpp>
Return the tail of the list L
starting at the first occurrence of T
, if any such element exists; the empty list, otherwise.
O(N)
. using meta::find_if = _t<detail::find_if_<L, Fn>> |
#include <meta/meta.hpp>
Return the tail of the list L
starting at the first element A
such that invoke<Fn, A>::value
is true
, if any such element exists; the empty list, otherwise.
O(N)
. using meta::find_index = _t<detail::find_index_<L, T>> |
#include <meta/meta.hpp>
Finds the index of the first occurrence of the type T
within the list L
. Returns #meta::npos
if the type T
was not found.
O(N)
.meta::npos
#include <meta/meta.hpp>
A Boolean integral constant wrapper around true
if there is at least one occurrence of T
in L
.
O(N)
. using meta::none_of = empty<find_if<L, Fn>> |
#include <meta/meta.hpp>
A Boolean integral constant wrapper around true
if invoke<Fn, A>::value
is false
for all elements A
in meta::list
L
; false
, otherwise.
O(N)
. using meta::reverse_find = drop<L, min<reverse_find_index<L, T>, size<L>>> |
#include <meta/meta.hpp>
Return the tail of the list L
starting at the last occurrence of T
, if any such element exists; the empty list, otherwise.
O(N)
. using meta::reverse_find_if = _t<detail::reverse_find_if_<L, Fn>> |
#include <meta/meta.hpp>
Return the tail of the list L
starting at the last element A
such that invoke<Fn, A>::value
is true
, if any such element exists; the empty list, otherwise.
O(N)
. using meta::reverse_find_index = _t<detail::reverse_find_index_<L, T>> |
#include <meta/meta.hpp>
Finds the index of the last occurrence of the type T
within the list L
. Returns #meta::npos
if the type T
was not found.
O(N)
.#meta::npos