cpp/ranges/size

Calculates the number of elements in in constant time.

A call to is expression-equivalent to:
 * , if is an array type with a known bound.
 * 1) Otherwise,, if  is , and that expression is valid and has an integer-like type.
 * 2) Otherwise,, if  is , and the converted expression is valid and has an integer-like type, where the overload resolution is performed with the following candidates:
 * 3) * any declarations of found by argument-dependent lookup
 * 4) Otherwise,, if  models  and  models ,
 * where denotes an explicit conversion to an unsigned-integer-like type.
 * 1) Otherwise,, if  models  and  models ,
 * where denotes an explicit conversion to an unsigned-integer-like type.

In all other cases, a call to is ill-formed, which can result in substitution failure when  appears in the immediate context of a template instantiation.