4.2.1
Freundlich's C++ toolkit
Classes | Typedefs | Functions
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 = fcppt::mpl::list::fold< List, fcppt::mpl::bind< fcppt::mpl::lambda< std::conjunction >, fcppt::mpl::bind< L, fcppt::mpl::arg< 1 > >, fcppt::mpl::arg< 2 > >, std::true_type >
 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. More...
 
template<fcppt::mpl::list::object_concept List, fcppt::mpl::lambda_concept L>
using any_of = fcppt::mpl::list::fold< List, fcppt::mpl::bind< fcppt::mpl::lambda< std::disjunction >, fcppt::mpl::bind< L, fcppt::mpl::arg< 1 > >, fcppt::mpl::arg< 2 > >, std::false_type >
 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. More...
 
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. More...
 
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. More...
 
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>. More...
 
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>. More...
 
template<fcppt::mpl::list::object_concept List, fcppt::mpl::size_type_concept I>
using at = typename fcppt::mpl::list::detail::at< List, I >::type
 The element of a list at a given position.If List = list::object<L_1,...,L_n> and I = fcppt::mpl::size_type<j> with 0 <= j < n then the result is L_{j-1}. More...
 
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. More...
 
template<fcppt::mpl::list::object_concept List, typename E >
using contains = fcppt::mpl::list::any_of< List, fcppt::mpl::bind< fcppt::mpl::lambda< std::is_same >, fcppt::mpl::arg< 1 >, fcppt::mpl::constant< E > > >
 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. More...
 
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. More...
 
template<fcppt::mpl::list::object_concept List, fcppt::mpl::size_type_concept S>
using drop = fcppt::mpl::list::map< fcppt::mpl::list::interval< S, fcppt::mpl::list::size< List > >, fcppt::mpl::bind< fcppt::mpl::lambda< fcppt::mpl::list::at >, fcppt::mpl::constant< List >, fcppt::mpl::arg< 1 > > >
 Removes some elements of a list from the beginning.If List = list::object<L_1,...,L_n> then the result is. More...
 
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. More...
 
template<typename Enum >
using enum_range = fcppt::mpl::list::enum_range_start_end< fcppt::enum_::min_value< Enum >, fcppt::enum_::max_value< Enum > >
 An mpl::list::object over an enum. More...
 
template<fcppt::type_traits::enum_constant_concept Start, fcppt::type_traits::enum_constant_concept Max>
using enum_range_start_end = typename fcppt::mpl::list::detail::enum_range_start_end< Start, Max >::type
 An mpl::list::object over enums from a minimum to a maximum. More...
 
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. More...
 
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>. More...
 
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. More...
 
template<fcppt::mpl::list::object_concept List, typename E >
using index_of = fcppt::mpl::list::index_of_if< List, fcppt::mpl::bind< fcppt::mpl::lambda< std::is_same >, fcppt::mpl::constant< E >, fcppt::mpl::arg< 1 > > >
 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. More...
 
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. More...
 
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. More...
 
template<fcppt::type_traits::integral_constant_concept Begin, fcppt::type_traits::integral_constant_concept End>
using interval = typename fcppt::mpl::list::detail::interval< std::make_integer_sequence< fcppt::type_traits::value_type< Begin >, End::value - Begin::value >, Begin >::type
 Return the interval between two numbers.If Begin = std::integral_constant<Type,B> and End = std::integral_constant<Type,E> then the result is. More...
 
template<typename T >
using is_object = typename fcppt::mpl::list::detail::is_object< T >::type
 Checks if a type is a list. More...
 
template<fcppt::mpl::list::object_concept List>
using join = fcppt::mpl::list::fold< List, fcppt::mpl::bind< fcppt::mpl::lambda< fcppt::mpl::list::append >, fcppt::mpl::arg< 2 >, fcppt::mpl::arg< 1 > >, fcppt::mpl::list::object<> >
 Joins a list of lists.If List = list::object<L_1,...,L_n> and L_1, ..., L_n are lists, then the result is. More...
 
template<fcppt::mpl::list::object_concept List, fcppt::mpl::lambda_concept Pred>
using keep_if = fcppt::mpl::list::remove_if< List, fcppt::mpl::bind< fcppt::mpl::lambda< std::negation >, Pred > >
 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. More...
 
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. More...
 
template<fcppt::mpl::lambda_concept F, fcppt::mpl::list::object_concept... Lists>
using map_multi = fcppt::mpl::list::map< fcppt::mpl::list::transpose< fcppt::mpl::list::object< Lists... > >, fcppt::mpl::bind< fcppt::mpl::lambda< fcppt::mpl::list::apply >, fcppt::mpl::constant< F >, fcppt::mpl::arg< 1 > > >
 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. More...
 
template<typename Sequence >
using maximum = fcppt::mpl::list::fold< Sequence, fcppt::mpl::bind< fcppt::mpl::lambda< fcppt::mpl::if_ >, fcppt::mpl::bind< fcppt::mpl::lambda< fcppt::mpl::greater >, fcppt::mpl::arg< 1 >, fcppt::mpl::arg< 2 > >, fcppt::mpl::arg< 1 >, fcppt::mpl::arg< 2 > >, fcppt::mpl::list::front< Sequence > >
 Calculates the maximum value of a list. More...
 
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. More...
 
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. More...
 
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. More...
 
template<fcppt::mpl::list::object_concept List, typename T >
using remove = fcppt::mpl::list::remove_if< List, fcppt::mpl::bind< fcppt::mpl::lambda< std::is_same >, fcppt::mpl::constant< T >, fcppt::mpl::arg< 1 > > >
 Removes a specific type from a list.Removes every occurrence of T from List. The order of the remaining elements stays the same. More...
 
template<fcppt::mpl::list::object_concept List, fcppt::mpl::lambda_concept Pred>
using remove_if = fcppt::mpl::list::fold< List, fcppt::mpl::bind< fcppt::mpl::lambda< fcppt::mpl::if_ >, fcppt::mpl::bind< Pred, fcppt::mpl::arg< 1 > >, fcppt::mpl::arg< 2 >, fcppt::mpl::bind< fcppt::mpl::lambda< fcppt::mpl::list::push_back >, fcppt::mpl::arg< 2 >, fcppt::mpl::arg< 1 > > >, fcppt::mpl::list::object<> >
 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. More...
 
template<typename T , fcppt::mpl::size_type_concept S>
using repeat = fcppt::mpl::list::map< fcppt::mpl::list::interval< fcppt::mpl::size_type< 0U >, S >, fcppt::mpl::constant< T > >
 Creates a list that consists of n elements that are all the same.Let S = fcppt::mpl::size_type<n>. Then the result is. More...
 
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>. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 

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. More...
 
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. More...
 
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. More...
 

Typedef Documentation

◆ as

template<template< typename... > class Type, fcppt::mpl::list::object_concept List>
using fcppt::mpl::list::as = typedef 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>.