4.6.0
Freundlich's C++ toolkit
|
Classes | |
class | object |
Like std::tuple but with a proper constructor. More... | |
Typedefs | |
template<typename Function , typename... Tuples> | |
using | apply_result |
Result of fcppt::tuple::apply. | |
template<std::size_t I, typename T , typename = fcppt::tuple::is_object<T>> | |
using | element = std::tuple_element_t<I, fcppt::tuple::impl_type<T>> |
The type of the I'th element of a tuple. | |
template<typename Array , typename = std::enable_if_t<fcppt::array::is_object<Array>::value>> | |
using | from_array_result |
Result of fcppt::tuple::from_array. | |
template<typename T > | |
using | is_object = typename fcppt::tuple::detail::is_object<T>::type |
Tests whether a type is a tuple. | |
template<typename Tuple , typename Function > | |
using | map_result |
The result type of fcppt::tuple::map. | |
template<typename Tuple , typename NewElement > | |
using | push_back_result |
The result type of fcppt::tuple::push_back. | |
template<typename Tuple , typename = std::enable_if_t<fcppt::tuple::is_object<Tuple>::value>> | |
using | size = std::integral_constant<std::size_t,std::tuple_size_v<fcppt::tuple::impl_type<Tuple>>> |
template<typename T , typename = std::enable_if_t<fcppt::tuple::is_object<T>::value>> | |
using | types_of = typename fcppt::tuple::detail::types_of<T>::type |
The types of a tuple as an mpl::list . | |
Functions | |
template<typename Function , typename... Tuples> | |
fcppt::tuple::apply_result< Function, Tuples... > | apply (Function const &_function, Tuples &&..._tuples) |
Applies a function to each tuple of elements of multiple tuples and returns a tuple containing the results. | |
template<typename Result , typename Tuple > requires (fcppt::tuple::is_object<std::remove_cvref_t<Tuple>>::value) | |
constexpr Result | as_struct (Tuple &&_tuple) |
Converts a tuple to a struct. | |
template<typename... Types> | |
bool | operator== (fcppt::tuple::object< Types... > const &a, fcppt::tuple::object< Types... > const &b) |
Compares two tuples for equality. | |
template<typename... Tuples> requires (std::conjunction_v<fcppt::tuple::is_object<Tuples>...>) | |
decltype(auto) | concat (Tuples &&..._tuples) |
Concatenates multiple tuples. | |
template<typename Array > requires (fcppt::array::is_object<std::remove_cvref_t<Array>>::value) | |
fcppt::tuple::from_array_result< std::remove_cvref_t< Array > > | from_array (Array &&_source) |
Converts an fcppt::array::object to an fcppt::tuple::object. | |
template<std::size_t I, typename... Types> requires (std::less<>{}(I, sizeof...(Types))) | |
constexpr fcppt::tuple::element< I, fcppt::tuple::object< Types... > > & | get (fcppt::tuple::object< Types... > &_value) noexcept |
Returns the I'th element of a nonconst tuple. | |
template<std::size_t I, typename... Types> requires (std::less<>{}(I, sizeof...(Types))) | |
constexpr fcppt::tuple::element< I, fcppt::tuple::object< Types... > > const & | get (fcppt::tuple::object< Types... > const &_value) noexcept |
Returns the I'th element of a const tuple. | |
template<typename Tuple , typename Function > requires (fcppt::tuple::is_object<Tuple>::value) | |
Tuple | init (Function const &_function) |
Constructs a tuple by calling a function with static indices. | |
template<typename F , typename Tuple > requires (std::conjunction_v< fcppt::tuple::is_object<std::remove_cvref_t<Tuple>>, fcppt::mpl::is_invocable<F, fcppt::tuple::types_of<std::remove_cvref_t<Tuple>>>>) | |
constexpr decltype(auto) | invoke (F const &_f, Tuple &&_tuple) |
Calls a function with the elements of a tuple. | |
template<typename... Types> | |
fcppt::tuple::object< std::remove_cvref_t< Types >... > | make (Types &&..._args) |
template<typename Tuple , typename Function > requires (fcppt::tuple::is_object<std::remove_cvref_t<Tuple>>::value) | |
fcppt::tuple::map_result< Tuple, Function > | map (Tuple &&_tuple, Function const &_function) |
Maps over a tuple. | |
template<typename Ch , typename Traits , typename... Types> | |
std::basic_ostream< Ch, Traits > & | operator<< (std::basic_ostream< Ch, Traits > &_stream, fcppt::tuple::object< Types... > const &_tuple) |
Outputs a tuple to a stream. | |
template<typename Tuple , typename NewElement > | |
fcppt::tuple::push_back_result< std::remove_cvref_t< Tuple >, std::remove_cvref_t< NewElement > > | push_back (Tuple &&_tuple, NewElement &&_new_element) |
Pushes an element to the back of a fcppt::tuple::object . | |
using fcppt::tuple::size = std::integral_constant<std::size_t,std::tuple_size_v<fcppt::tuple::impl_type<Tuple>>> |
|
inlinenodiscard |