4.2.1
Freundlich's C++ toolkit
Classes | Typedefs
fcppt::mpl::set Namespace Reference

Classes

struct  object
 The set type used by this library.A map is constructed from a variadic list of types, which must be pairwise disjoint. More...
 

Typedefs

template<fcppt::mpl::set::object_concept Set, typename Key >
using contains = typename fcppt::mpl::set::detail::contains< Set, Key >::type
 Checks if a set contains an element.Let Set = set::object<E_1,...,E_n>. The result is std::true_type if Key = E_i for some 1 <= i <= n. Otherwise, it is std::false_type. More...
 
template<fcppt::mpl::set::object_concept Set1, fcppt::mpl::set::object_concept Set2>
using difference = fcppt::mpl::list::fold< fcppt::mpl::set::to_list< Set1 >, fcppt::mpl::bind< fcppt::mpl::lambda< fcppt::mpl::if_ >, fcppt::mpl::bind< fcppt::mpl::lambda< fcppt::mpl::set::contains >, fcppt::mpl::constant< Set2 >, fcppt::mpl::arg< 1 > >, fcppt::mpl::arg< 2 >, fcppt::mpl::bind< fcppt::mpl::lambda< fcppt::mpl::set::insert >, fcppt::mpl::arg< 2 >, fcppt::mpl::arg< 1 > > >, fcppt::mpl::set::object<> >
 The difference of two sets.The result contains every element that is in Set1, but not in Set2. More...
 
template<fcppt::mpl::set::object_concept Set1, fcppt::mpl::set::object_concept Set2>
using equal = std::is_same< fcppt::mpl::set::symmetric_difference< Set1, Set2 >, fcppt::mpl::set::object<> >
 Checks if two sets are equal. More...
 
template<fcppt::mpl::list::object_concept List>
using from_list = typename fcppt::mpl::set::detail::from_list< List >::type
 Converts a list with no duplicates into a set.Let List = list::object<L_1,...,L_n>, where L_1,...,L_n are pairwise disjoint. The result is. More...
 
template<fcppt::mpl::list::object_concept List>
using from_list_relaxed = fcppt::mpl::list::fold< List, fcppt::mpl::bind< fcppt::mpl::lambda< fcppt::mpl::set::insert_relaxed >, fcppt::mpl::arg< 2 >, fcppt::mpl::arg< 1 > >, fcppt::mpl::set::object<> >
 Converts a list with into a set, removing duplicates.Unlike fcppt::mpl::set::from_list, this function allows duplicate elements. More...
 
template<fcppt::mpl::set::object_concept Set, typename E >
using insert = typename fcppt::mpl::set::detail::insert< Set, E >::type
 Inserts a new element into a set.Let Set = set::object<E_1,...,E_n>. Then the result is. More...
 
template<fcppt::mpl::set::object_concept Set, typename Value >
using insert_relaxed = fcppt::mpl::apply< fcppt::mpl::if_< fcppt::mpl::set::contains< Set, Value >, fcppt::mpl::constant< Set >, fcppt::mpl::bind< fcppt::mpl::lambda< fcppt::mpl::set::insert >, fcppt::mpl::constant< Set >, fcppt::mpl::constant< Value > > > >
 Inserts an element into a set.Let Set = set::object<E_1,...,E_n>. If E is not equal to any of the E_1,...,E_n, then the result is. More...
 
template<fcppt::mpl::set::object_concept Set1, fcppt::mpl::set::object_concept Set2>
using intersection = fcppt::mpl::list::fold< fcppt::mpl::set::to_list< Set1 >, fcppt::mpl::bind< fcppt::mpl::lambda< fcppt::mpl::if_ >, fcppt::mpl::bind< fcppt::mpl::lambda< fcppt::mpl::set::contains >, fcppt::mpl::constant< Set2 >, fcppt::mpl::arg< 1 > >, fcppt::mpl::bind< fcppt::mpl::lambda< fcppt::mpl::set::insert_relaxed >, fcppt::mpl::arg< 2 >, fcppt::mpl::arg< 1 > >, fcppt::mpl::arg< 2 > >, fcppt::mpl::set::object<> >
 The intersection of two sets.The result contains every element that is both in Set1 and Set2. More...
 
template<typename T >
using is_object = typename fcppt::mpl::set::detail::is_object< T >::type
 Checks if a type is a set. More...
 
template<fcppt::mpl::set::object_concept Set>
using size = fcppt::mpl::list::size< fcppt::mpl::set::to_list< Set > >
 The size of a set.If Set = set::object<L_1,...,L_n> then the result is fcppt::mpl::size_type<n>. More...
 
template<fcppt::mpl::set::object_concept Set1, fcppt::mpl::set::object_concept Set2>
using symmetric_difference = fcppt::mpl::set::union_< fcppt::mpl::set::difference< Set1, Set2 >, fcppt::mpl::set::difference< Set2, Set1 > >
 The symmetric difference of two sets.The result contains every element that is either in Set1 or in Set2, but not in both. More...
 
template<fcppt::mpl::set::object_concept Set>
using to_list = typename fcppt::mpl::set::detail::to_list< Set >::type
 Converts a set to a list.Let Set = set::object<E_1,...,E_n>. The result is. More...
 
template<fcppt::mpl::set::object_concept Set1, fcppt::mpl::set::object_concept Set2>
using union_ = fcppt::mpl::list::fold< fcppt::mpl::set::to_list< Set1 >, fcppt::mpl::bind< fcppt::mpl::lambda< fcppt::mpl::set::insert_relaxed >, fcppt::mpl::arg< 2 >, fcppt::mpl::arg< 1 > >, Set2 >
 The union of two sets.The result contains every element that is in Set1 or in Set2. More...
 
template<typename... Args>
using unique = fcppt::mpl::list::distinct< fcppt::mpl::list::object< Args... > >
 Checks if a variadic list is pairwise disjoint. More...