Meta  0.1
A tiny metaprogramming library
Query/Search

Description

Query and search algorithms.

Modules

 lazy
 

Typedefs

template<typename List , typename F >
using meta::all_of = empty< find_if< List, not_fn< F >>>
 A Boolean integral constant wrapper around true if invoke<F, A>::value is true for all elements A in meta::list List; false, otherwise. More...
 
template<typename List , typename F >
using meta::any_of = not_< empty< find_if< List, F >>>
 A Boolean integral constant wrapper around true if invoke<F, A>::value is true for any element A in meta::list List; false, otherwise. More...
 
template<typename List , typename T >
using meta::count = fold< List, meta::size_t< 0 >, bind_back< quote< detail::count_fn >, T >>
 Count the number of times a type T appears in the list List. More...
 
template<typename List , typename Fn >
using meta::count_if = fold< List, meta::size_t< 0 >, bind_back< quote< detail::count_if_fn >, Fn >>
 Count the number of times the predicate Fn evaluates to true for all the elements in the list List. More...
 
template<typename List , typename T >
using meta::find = drop< List, min< find_index< List, T >, size< List >>>
 Return the tail of the list List starting at the first occurrence of T, if any such element exists; the empty list, otherwise. More...
 
template<typename List , typename Fun >
using meta::find_if = _t< detail::find_if_< List, Fun >>
 Return the tail of the list List starting at the first element A such that invoke<Fun, A>::value is true, if any such element exists; the empty list, otherwise. More...
 
template<typename List , typename T >
using meta::find_index = _t< detail::find_index_< List, T >>
 Finds the index of the first occurrence of the type T within the list List. Returns meta::npos if the type T was not found. More...
 
template<typename List , typename T >
using meta::in = not_< empty< find< List, T >>>
 A Boolean integral constant wrapper around true if there is at least one occurrence of T in List. More...
 
template<typename List , typename F >
using meta::none_of = empty< find_if< List, F >>
 A Boolean integral constant wrapper around true if invoke<F, A>::value is false for all elements A in meta::list List; false, otherwise. More...
 
template<typename List , typename T >
using meta::reverse_find = drop< List, min< reverse_find_index< List, T >, size< List >>>
 Return the tail of the list List starting at the last occurrence of T, if any such element exists; the empty list, otherwise. More...
 
template<typename List , typename Fun >
using meta::reverse_find_if = _t< detail::reverse_find_if_< List, Fun >>
 Return the tail of the list List starting at the last element A such that invoke<Fun, A>::value is true, if any such element exists; the empty list, otherwise. More...
 
template<typename List , typename T >
using meta::reverse_find_index = _t< detail::reverse_find_index_< List, T >>
 Finds the index of the last occurrence of the type T within the list List. Returns meta::npos if the type T was not found. More...
 

Typedef Documentation

template<typename List , typename F >
using meta::all_of = typedef empty<find_if<List, not_fn<F>>>

#include <meta/meta.hpp>

A Boolean integral constant wrapper around true if invoke<F, A>::value is true for all elements A in meta::list List; false, otherwise.

Complexity
$ O(N) $.

Definition at line 2242 of file meta.hpp.

template<typename List , typename F >
using meta::any_of = typedef not_<empty<find_if<List, F>>>

#include <meta/meta.hpp>

A Boolean integral constant wrapper around true if invoke<F, A>::value is true for any element A in meta::list List; false, otherwise.

Complexity
$ O(N) $.

Definition at line 2260 of file meta.hpp.

template<typename List , typename T >
using meta::count = typedef fold<List, meta::size_t<0>, bind_back<quote<detail::count_fn>, T>>

#include <meta/meta.hpp>

Count the number of times a type T appears in the list List.

Complexity
$ O(N) $.

Definition at line 1959 of file meta.hpp.

template<typename List , typename Fn >
using meta::count_if = typedef fold<List, meta::size_t<0>, bind_back<quote<detail::count_if_fn>, Fn>>

#include <meta/meta.hpp>

Count the number of times the predicate Fn evaluates to true for all the elements in the list List.

Complexity
$ O(N) $.

Definition at line 1983 of file meta.hpp.

template<typename List , typename T >
using meta::find = typedef drop<List, min<find_index<List, T>, size<List>>>

#include <meta/meta.hpp>

Return the tail of the list List starting at the first occurrence of T, if any such element exists; the empty list, otherwise.

Complexity
$ O(N) $.

Definition at line 1769 of file meta.hpp.

template<typename List , typename Fun >
using meta::find_if = typedef _t<detail::find_if_<List, Fun>>

#include <meta/meta.hpp>

Return the tail of the list List starting at the first element A such that invoke<Fun, A>::value is true, if any such element exists; the empty list, otherwise.

Complexity
$ O(N) $.

Definition at line 1826 of file meta.hpp.

template<typename List , typename T >
using meta::find_index = typedef _t<detail::find_index_<List, T>>

#include <meta/meta.hpp>

Finds the index of the first occurrence of the type T within the list List. Returns meta::npos if the type T was not found.

Complexity
$ O(N) $.
See also
meta::npos

Definition at line 1672 of file meta.hpp.

template<typename List , typename T >
using meta::in = typedef not_<empty<find<List, T>>>

#include <meta/meta.hpp>

A Boolean integral constant wrapper around true if there is at least one occurrence of T in List.

Complexity
$ O(N) $.

Definition at line 2296 of file meta.hpp.

template<typename List , typename F >
using meta::none_of = typedef empty<find_if<List, F>>

#include <meta/meta.hpp>

A Boolean integral constant wrapper around true if invoke<F, A>::value is false for all elements A in meta::list List; false, otherwise.

Complexity
$ O(N) $.

Definition at line 2278 of file meta.hpp.

template<typename List , typename T >
using meta::reverse_find = typedef drop<List, min<reverse_find_index<List, T>, size<List>>>

#include <meta/meta.hpp>

Return the tail of the list List starting at the last occurrence of T, if any such element exists; the empty list, otherwise.

Complexity
$ O(N) $.

Definition at line 1785 of file meta.hpp.

template<typename List , typename Fun >
using meta::reverse_find_if = typedef _t<detail::reverse_find_if_<List, Fun>>

#include <meta/meta.hpp>

Return the tail of the list List starting at the last element A such that invoke<Fun, A>::value is true, if any such element exists; the empty list, otherwise.

Complexity
$ O(N) $.

Definition at line 1868 of file meta.hpp.

template<typename List , typename T >
using meta::reverse_find_index = typedef _t<detail::reverse_find_index_<List, T>>

#include <meta/meta.hpp>

Finds the index of the last occurrence of the type T within the list List. Returns meta::npos if the type T was not found.

Complexity
$ O(N) $.
See also
meta::npos

Definition at line 1723 of file meta.hpp.