22 General utilities library [utilities]

22.4 Tuples [tuple]

22.4.10 common_reference related specializations [tuple.common.ref]

In the descriptions that follow:
  • Let TTypes be a pack formed by the sequence of tuple_element_t<i, TTuple> for every integer .
  • Let UTypes be a pack formed by the sequence of tuple_element_t<i, UTuple> for every integer .
template<tuple-like TTuple, tuple-like UTuple, template<class> class TQual, template<class> class UQual> struct basic_common_reference<TTuple, UTuple, TQual, UQual> { using type = see below; };
Constraints:
  • TTuple is a specialization of tuple or UTuple is a specialization of tuple.
  • is_same_v<TTuple, decay_t<TTuple>> is true.
  • is_same_v<UTuple, decay_t<UTuple>> is true.
  • tuple_size_v<TTuple> equals tuple_size_v<UTuple>.
  • tuple<common_reference_t<TQual<TTypes>, UQual<UTypes>>...> denotes a type.
The member typedef-name type denotes the type tuple<common_reference_t<TQual<TTypes>, UQual<UTypes>>...>.
template<tuple-like TTuple, tuple-like UTuple> struct common_type<TTuple, UTuple> { using type = see below; };
Constraints:
  • TTuple is a specialization of tuple or UTuple is a specialization of tuple.
  • is_same_v<TTuple, decay_t<TTuple>> is true.
  • is_same_v<UTuple, decay_t<UTuple>> is true.
  • tuple_size_v<TTuple> equals tuple_size_v<UTuple>.
  • tuple<common_type_t<TTypes, UTypes>...> denotes a type.
The member typedef-name type denotes the type tuple<common_type_t<TTypes, UTypes>...>.