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>...>.