27 Time library [time]

27.4 Time-related traits [time.traits]

27.4.4 Class template is_­clock [time.traits.is.clock]

template<class T> struct is_clock;
is_­clock is a Cpp17UnaryTypeTrait ([meta.rqmts]) with a base characteristic of true_­type if T meets the Cpp17Clock requirements ([time.clock.req]), otherwise false_­type.
For the purposes of the specification of this trait, the extent to which an implementation determines that a type cannot meet the Cpp17Clock requirements is unspecified, except that as a minimum a type T shall not qualify as a Cpp17Clock unless it satisfies all of the following conditions:
  • the qualified-ids T::rep, T::period, T::duration, and T::time_­point are valid and each denotes a type ([temp.deduct]),
  • the expression T::is_­steady is well-formed when treated as an unevaluated operand,
  • the expression T::now() is well-formed when treated as an unevaluated operand.
The behavior of a program that adds specializations for is_­clock is undefined.