On this page
std::common_type<std::pair>
Defined in header <utility> |
||
|---|---|---|
|
(since C++23) |
The common type of two pairs is a pair of both common types of corresponding element types of both pairs.
The common type is defined only if both pairs of corresponding element types have common types.
Member types
| Member type | Definition |
|---|---|
type |
std::pair<std::common_type_t<T1, U1>, std::common_type_t<T2, U2>> |
Example
See also
|
(C++11)
|
determines the common type of a group of types (class template) |
|
(C++23)
|
determines the common type of a tuple and a tuple-like type (class template specialization) |
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/w/cpp/utility/pair/common_type