cpp/types/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.


 * If is zero, there is no member.
 * If is one (i.e.,  contains only one type ), the member  names the same type as  if it exists; otherwise there is no member.
 * 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, if there is a user specialization for, that specialization is used;
 * Otherwise, if is a valid type, the member  denotes that type;


 * Otherwise, 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 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.

Note that the behavior of a program that adds a specialization to any other template from  is undefined.

The following specializations are already provided by the standard library: