![]() |
VCCC
2024.05
VisualCamp Common C++ library
|
Implementation of STL header <tuple>
More...
See tuple for more information.
Classes | |
| struct | tuple_like< T > |
| specifies that a type implemented the tuple protocol More... | |
| struct | sized_tuple_like< T, N > |
| check if tuple-like objects with exactly N elements. More... | |
Typedefs | |
| template<typename T > | |
| using | pair_like = sized_tuple_like< T, 2 > |
| pair-like objects are tuple-like objects with exactly 2 elements. More... | |
Functions | |
| template<class F , class Tuple > | |
| constexpr decltype(auto) | apply (F &&f, Tuple &&t) |
| calls a function with the elements of tuple of arguments More... | |
| template<typename T , typename Tuple , std::enable_if_t< internal::is_constructible_from_tuple< T, Tuple >::value, int > = 0> | |
| constexpr T | make_from_tuple (Tuple &&t) |
| construct an object with a tuple of arguments More... | |
| template<typename Tuple , typename T , typename F , std::enable_if_t< conjunction< tuple_like< Tuple >>::value, int > = 0> | |
| constexpr auto | tuple_fold_left (Tuple &&tuple, T &&init, F &&f) |
| Left fold operation for each tuple elements. More... | |
| template<typename Tuple , typename F > | |
| constexpr std::enable_if_t< detail::tuple_for_each_invocable< Tuple, F >::value > | tuple_for_each (Tuple &&t, F &&f) |
| template<typename Tuple , typename F > | |
| constexpr std::enable_if_t< detail::tuple_for_each_in_place_index_invocable< Tuple, F >::value > | tuple_for_each_index (Tuple &&t, F &&f) |
| template<typename Tuple , typename F > | |
| constexpr auto | tuple_transform (Tuple &&t, F &&f) noexcept(noexcept(detail::tuple_transform_impl(std::forward< Tuple >(t), std::forward< F >(f), std::make_index_sequence< std::tuple_size< remove_cvref_t< Tuple >>::value >{}))) |
| Constructs a new tuple with each elements transformed. More... | |
| using pair_like = sized_tuple_like<T, 2> |
|
inlineconstexpr |
Invoke the Callable object f with the elements of t as arguments.
| f | Callable object to be invoked |
| t | tuple whose elements to be used as arguments to f |
f.std::tuple, and instead may be anything that supports std::get and std::tuple_size; in particular, std::array and std::pair may be used.Output:
|
constexpr |
Construct an object of type T, using the elements of the tuple t as the arguments to the constructor.
| t | tuple whose elements to be used as arguments to the constructor of T |
Output:
|
constexpr |
|
constexpr |
|
constexpr |
|
constexprnoexcept |