Namespaces
Variants

std:: common_type <std::pair>

From cppreference.net
Utilities library
定義済みヘッダー <utility>
template < class T1, class T2, class U1, class U2 >

requires requires { typename std:: pair < std:: common_type_t < T1, U1 > ,
std:: common_type_t < T2, U2 >> ; }

struct common_type < std:: pair < T1, T2 > , std:: pair < U1, U2 >> ;
(C++23以降)

2つの pair の共通型は、両 pair の対応する要素型の両方の共通型からなる pair です。

共通の型は、対応する要素型の両方のペアが共通の型を持つ場合にのみ定義されます。

メンバー型

メンバー型 定義
type std:: pair < std:: common_type_t < T1, U1 > , std:: common_type_t < T2, U2 >>

関連項目

型のグループの共通型を決定する
(クラステンプレート)
tuple tuple-like 型の共通型を決定する
(クラステンプレート特殊化)