|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Member functions | ||||
| Non-member functions | ||||
(until C++20)(until C++20)(until C++20)(until C++20)(until C++20)(C++20) | ||||
| Helper concepts | ||||
(C++23) | ||||
| Helper classes | ||||
common_type<std::tuple> (C++23) | ||||
(C++23) | ||||
| Deduction guides(C++17) |
Defined in header <tuple> | ||
template< tuple-like TTuple, tuple-like UTuple> requires/* see below */ | (since C++23) | |
The common type of twotuple-like types is astd::tuple consists of the common types of all corresponding element type pairs of both types.
Given
TTypes as the pack formed by the sequence ofstd::tuple_element_t<i, TTuple> for every integeri in[0, std::tuple_size_v<TTuple>), andUTypes as the pack formed by the sequence ofstd::tuple_element_t<i, UTuple> for every integeri in[0, std::tuple_size_v<UTuple>),the following constraints need to be satisfied:
TTuple orUTuple is astd::tuple specialization.TTuple andUTuple have the same number of elements).| Member type | Definition |
type | std::tuple<std::common_type_t<TTypes, UTypes>...> |
| This section is incomplete Reason: no example |
(C++11) | determines the common type of a group of types (class template)[edit] |
(C++23) | determines the common type of twopairs(class template specialization)[edit] |