cpp/experimental/ranges/type traits/common type

Determines the common type among all types, that is the type all can be implicitly converted to. If such a type exists (as determined according to the rules below), the member names that type. Otherwise, there is no member. The behavior is undefined if any of the types in is an incomplete type other than (possibly cv-qualified).


 * If is zero, there is no member.
 * If is one (i.e.,  contains only one type ), the member  names the same type as.
 * If is two (i.e.,  contains exactly two types  and ),
 * If applying std to at least one of and  produces a different type, the member  names the same type as, if it exists; if not, there is no member.
 * Otherwise, (and unless there is a user specialization for ), if is well-formed, then the member  denotes that type;
 * Otherwise, the member denotes the type, if that conditional expression is well-formed; if not, there is no member.


 * If is greater than two (i.e.,  consists of the types ), then if  exists, the member  denotes  if such a type exists. In all other cases, there is no member.

Specializations
Users may specialize for types  and  if
 * At least one of and  depends on a user-defined type, and
 * std is an identity transformation for both and.

If such a specialization has a member named, it must be a public and unambiguous member type that names a cv-unqualified non-reference type to which both and  are explicitly convertible. Additionally, and  must denote the same type.

A program that adds specializations in violation of these rules has undefined behavior.