Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      std::common_type<std::pair>

      From cppreference.com
      <cpp‎ |utility‎ |pair
       
       
      Utilities library
       
       
      Defined in header<utility>
      template<class T1,class T2,class U1,class U2>

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

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

      The common type of twopairs is apair of both common types of corresponding element types of bothpairs.

      The common type is defined only if both pairs of corresponding element types have common types.

      [edit]Member types

      Member type Definition
      typestd::pair<std::common_type_t<T1, U1>,std::common_type_t<T2, U2>>

      [edit]Example

      This section is incomplete
      Reason: no example

      [edit]See also

      determines the common type of a group of types
      (class template)[edit]
      determines the common type of atuple and atuple-like type
      (class template specialization)[edit]
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/utility/pair/common_type&oldid=167399"

      [8]ページ先頭

      ©2009-2025 Movatter.jp