4.6.0
Freundlich's C++ toolkit
Loading...
Searching...
No Matches
fcppt::mpl::list Namespace Reference

Classes

struct  object
 The list type used by this library. More...
 

Typedefs

template<fcppt::mpl::list::object_concept List, fcppt::mpl::lambda_concept L>
using all_of
 Checks if a predicate holds for all types of a list.If List=list::object<L_1,...,L_n> and L holds a function F of arity 1, then the result is.
 
template<fcppt::mpl::list::object_concept List, fcppt::mpl::lambda_concept L>
using any_of
 Checks if a predicate holds for any type of a list.If List=list::object<L_1,...,L_n> and L holds a function F of arity 1, then the result is.
 
template<fcppt::mpl::list::object_concept List1, fcppt::mpl::list::object_concept List2>
using append = typename fcppt::mpl::list::detail::append<List1,List2>::type
 Appends two lists.If List1 = list::object<L_1,...,L_n> and List2 = list::object<R_1,...,R_m> then the result is.
 
template<fcppt::mpl::lambda_concept L, fcppt::mpl::list::object_concept Args>
using apply = typename fcppt::mpl::list::detail::apply<L,Args>::type
 Calls a lambda using a list of arguments.
 
template<template< typename... > class Type, fcppt::mpl::list::object_concept List>
using as = fcppt::mpl::list::apply<fcppt::mpl::lambda<Type>,List>
 Converts a list to another type. If List=list::object<L_1,...,L_n> then the result is Type<L_1,...,L_n>.
 
template<fcppt::mpl::list::object_concept List>
using as_tuple = fcppt::mpl::list::as<fcppt::tuple::object, List>
 Converts a list to a tuple. If List=list::object<L_1,...,L_n> then the result is fcppt::tuple::object<L_1,...,L_n>.
 
template<fcppt::mpl::list::object_concept List, fcppt::mpl::size_type_concept Index>
using at = typename fcppt::mpl::list::detail::at<List,Index>::type
 The element of a list at a given position.If List = list::object<L_1,...,L_n> and Index = fcppt::mpl::size_type<j> with 0 <= j < n then the result is L_{j-1}.
 
template<fcppt::mpl::list::object_concept List>
using back = fcppt::mpl::list::at<List,fcppt::mpl::dec<fcppt::mpl::list::size<List>>>
 The last element of a list.If List = list::object<L_1,...,L_n> then the result is L_n.
 
template<fcppt::mpl::list::object_concept List, typename E >
using contains
 Checks if a list contains an element.Let List = list::object<L_1,...,L_n>. The result is std::true_type if E = L_i for some 1 <= i <= n. Otherwise, it is std::false_type.
 
template<fcppt::mpl::list::object_concept List>
using distinct = typename fcppt::mpl::list::detail::distinct<List>::type
 Checks if all elements of a list are pairwise disjoint.Let List = list::object<L_1,...,L_n>. If L_i != L_j for all 1 <= i != j <= n then the result is std::true_type. Otherwise, it is std::false_type.
 
template<fcppt::mpl::list::object_concept List, fcppt::mpl::size_type_concept S>
using drop
 Removes some elements of a list from the beginning.If List = list::object<L_1,...,L_n> then the result is.
 
template<fcppt::mpl::list::object_concept List>
using empty = std::is_same<fcppt::mpl::list::size<List>,fcppt::mpl::size_type<0U>>
 Checks if a list is empty.Let List = list::object<L_1,...,L_n>. If n = 0 then std::true_type is returned. Otherwise, std::false_typeis returned.
 
template<typename Enum >
using enum_range
 An mpl::list::object over an enum.
 
template<fcppt::type_traits::enum_constant_concept Start, fcppt::type_traits::enum_constant_concept Max>
using enum_range_start_end
 An mpl::list::object over enums from a minimum to a maximum.
 
template<fcppt::mpl::list::object_concept List, fcppt::mpl::lambda_concept L, typename V >
using fold = typename fcppt::mpl::list::detail::fold<List,L,V>::type
 Folds a list.
 
template<typename Type >
using from = typename fcppt::mpl::list::detail::from<Type>::type
 Converts a template type to a list.If Type = T<L_1, ..., L_n> then the result is list::object<L_1,...,L_n>.
 
template<fcppt::mpl::list::object_concept List>
using front = typename fcppt::mpl::list::detail::front<List>::type
 The first element of a list.If List = list::object<L_1,...,L_n> then the result is L_1.
 
template<fcppt::mpl::list::object_concept List, typename E >
using index_of
 The first index of a given element inside a list.Let List = list::object<L_1,...,L_n>. Returns size_type<Index> where Index is the smallest number such that L_{Index} = E.
 
template<fcppt::mpl::list::object_concept List, fcppt::mpl::lambda_concept L>
using index_of_if = typename fcppt::mpl::list::detail::index_of_if<List,L,fcppt::mpl::size_type<0U>>::type
 The first index where an element matches a predicate inside a list.Let List = list::object<L_1,...,L_n> and let L hold a function F of arity 1. Returns size_type<Index> where Index is the smallest number such that F<L_{Index}> = std::true_type.
 
template<fcppt::mpl::list::object_concept List>
using indices = fcppt::mpl::list::interval<fcppt::mpl::size_type<0U>,fcppt::mpl::list::size<List>>
 Returns the positions of a list.If List = list::object<L_1,...,L_n> then the result is.
 
template<fcppt::type_traits::integral_constant_concept Begin, fcppt::type_traits::integral_constant_concept End>
using interval
 Return the interval between two numbers.If Begin = std::integral_constant<Type,B> and End = std::integral_constant<Type,E> then the result is.
 
template<typename T >
using is_object = typename fcppt::mpl::list::detail::is_object<T>::type
 Checks if a type is a list.
 
template<fcppt::mpl::list::object_concept List>
using join
 Joins a list of lists.If List = list::object<L_1,...,L_n> and L_1, ..., L_n are lists, then the result is.
 
template<fcppt::mpl::list::object_concept List, fcppt::mpl::lambda_concept Pred>
using keep_if
 Only keeps elements that satisfy a predicate.Keeps the elements of List for which Pred is std::true_type. The order of the elements stays the same.
 
template<fcppt::mpl::list::object_concept List, fcppt::mpl::lambda_concept F>
using map = typename fcppt::mpl::list::detail::map<List,F>::type
 Applies a lambda to every element of a list.If List=list::object<L_1,...,L_n> and L holds a function F of arity 1, then the result is.
 
template<fcppt::mpl::lambda_concept F, fcppt::mpl::list::object_concept... Lists>
using map_multi
 Applies an n-ary lambda to every element-tuple of n lists.If Lists=list::object<L_{1,1},...,L_{1,k}>, ... list::object<L_{1,n},...,L_{n,k}> and L holds a function F of arity n, then the result is.
 
template<typename Sequence >
using maximum
 Calculates the maximum value of a list.
 
template<fcppt::mpl::list::object_concept List>
using pop_back = typename fcppt::mpl::list::detail::pop_back<fcppt::mpl::list::object<>,List>::type
 Removes the last element of a list.If List = list::object<L_1,...,L_n>, where n >= 1, then the result is.
 
template<fcppt::mpl::list::object_concept List, typename T >
using push_back = typename fcppt::mpl::list::detail::push_back<List,T>::type
 Adds an element to the back of a list.If List = list::object<L_1,...,L_n>, then the result is.
 
template<fcppt::mpl::list::object_concept List, typename T >
using push_front = typename fcppt::mpl::list::detail::push_front<List,T>::type
 Adds an element to the front of a list.If List = list::object<L_1,...,L_n>, then the result is.
 
template<fcppt::mpl::list::object_concept List, typename T >
using remove
 Removes a specific type from a list.Removes every occurrence of T from List. The order of the remaining elements stays the same.
 
template<fcppt::mpl::list::object_concept List, fcppt::mpl::lambda_concept Pred>
using remove_if
 Removes the elements that satisfy a predicate.Removes the elements of List for which Pred is std::true_type. The order of the remaining elements stays the same.
 
template<typename T , fcppt::mpl::size_type_concept S>
using repeat
 Creates a list that consists of n elements that are all the same.Let S = fcppt::mpl::size_type<n>. Then the result is.
 
template<fcppt::mpl::list::object_concept List>
using size = typename fcppt::mpl::list::detail::size<List>::type
 The size of a list.If List = list::object<L_1,...,L_n> then the result is fcppt::mpl::size_type<n>.
 
template<fcppt::mpl::list::object_concept List>
using tail = typename fcppt::mpl::list::detail::tail<List>::type
 Removes the first element of a list.If List = list::object<L_1,...,L_n>, where n >= 1, then the result is.
 
template<fcppt::mpl::list::object_concept List, fcppt::mpl::size_type_concept S>
using take = typename fcppt::mpl::list::detail::take<List,std::make_index_sequence<S::value>>::type
 Keeps some elements of a list from the beginning.If List = list::object<L_1,...,L_n> then the result is.
 
template<fcppt::mpl::list::object_concept List>
using transpose = typename fcppt::mpl::list::detail::transpose<List>::type
 Transposes n lists of length k into k lists of length n.If.
 
template<fcppt::mpl::list::object_concept List>
using unique = fcppt::mpl::set::to_list<fcppt::mpl::set::from_list_relaxed<List>>
 Removes duplicates from a list.
 

Functions

template<fcppt::mpl::list::object_concept List, typename Function >
void for_each_break (Function const &_function)
 Calls a runtime function for each element of a listing, possibly breaking out early.
 
template<fcppt::mpl::list::object_concept List, typename Function , typename FailFunction >
FCPPT_PP_PUSH_WARNING std::invoke_result_t< FailFunction > invoke_on (std::size_t const _index, Function const &_function, FailFunction const &_fail_function)
 Applies a function to the nth element of an mpl::list::object with a runtime index.
 
template<typename Ch , typename Traits , typename... Types>
std::basic_ostream< Ch, Traits > & operator<< (std::basic_ostream< Ch, Traits > &_stream, fcppt::mpl::list::object< Types... > const &)
 Prints a list.Prints List to _stream. Every type in List will be converted to a string using fcppt::type_name.
 

Variables

template<fcppt::mpl::list::object_concept List, fcppt::mpl::lambda_concept L>
constexpr bool all_of_v = fcppt::mpl::list::all_of<List,L>::value
 Checks if a predicate holds for all types of a list.
 
template<fcppt::mpl::list::object_concept List, fcppt::mpl::lambda_concept L>
constexpr bool any_of_v = fcppt::mpl::list::any_of<List,L>::value
 Checks if a predicate holds for any type of a list.
 
template<fcppt::mpl::lambda_concept L, fcppt::mpl::list::object_concept Args>
constexpr bool apply_v = fcppt::mpl::list::apply<L,Args>::value
 Calls a lambda using a list of arguments.
 
template<fcppt::mpl::list::object_concept List, typename E >
constexpr bool contains_v = fcppt::mpl::list::contains<List,E>::value
 Checks if a list contains an element.
 
template<fcppt::mpl::list::object_concept List>
constexpr bool distinct_v = fcppt::mpl::list::distinct<List>::value
 Checks if all elements of a list are pairwise disjoint.
 
template<fcppt::mpl::list::object_concept List>
constexpr bool empty_v = fcppt::mpl::list::empty<List>::value
 Checks if a list is empty.
 

Typedef Documentation

◆ as

template<template< typename... > class Type, fcppt::mpl::list::object_concept List>
using fcppt::mpl::list::as = fcppt::mpl::list::apply<fcppt::mpl::lambda<Type>,List>

Converts a list to another type. If List=list::object<L_1,...,L_n> then the result is Type<L_1,...,L_n>.

◆ as_tuple

Converts a list to a tuple. If List=list::object<L_1,...,L_n> then the result is fcppt::tuple::object<L_1,...,L_n>.