[time.traits.is.clock]

# 30 Time library [[time]](./#time)

## 30.4 Time-related traits [[time.traits]](time.traits#is.clock)

### 30.4.4 Class template is_clock [time.traits.is.clock]

[ð](#lib:is_clock)

`template<class T> struct is_clock;
`

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/time.tex#L1205)

is_clock is a [*Cpp17UnaryTypeTrait*](meta.rqmts#:Cpp17UnaryTypeTrait "21.3.2 Requirements [meta.rqmts]") ([[meta.rqmts]](meta.rqmts "21.3.2 Requirements"))
with a base characteristic of true_type if T meets the [*Cpp17Clock*](time.clock.req#:Cpp17Clock "30.3 Cpp17Clock requirements [time.clock.req]") requirements ([[time.clock.req]](time.clock.req "30.3 Cpp17Clock requirements")),
otherwise false_type[.](#1.sentence-1)

For the purposes of the specification of this trait,
the extent to which an implementation determines
that a type cannot meet the [*Cpp17Clock*](time.clock.req#:Cpp17Clock "30.3 Cpp17Clock requirements [time.clock.req]") requirements is unspecified,
except that as a minimum
a type T shall not qualify as a [*Cpp17Clock*](time.clock.req#:Cpp17Clock "30.3 Cpp17Clock requirements [time.clock.req]") unless it meets all of the following conditions:

- [(1.1)](#1.1)

the [*qualified-id*](expr.prim.id.qual#nt:qualified-id "7.5.5.3 Qualified names [expr.prim.id.qual]")*s*T​::​rep,T​::​period,T​::​duration, andT​::​time_point are valid and each denotes a type ([[temp.deduct]](temp.deduct "13.10.3 Template argument deduction")),

- [(1.2)](#1.2)

the expressionT​::​is_steady is well-formed when treated as an [unevaluated operand](expr.context#def:unevaluated_operand "7.2.3 Context dependence [expr.context]"),

- [(1.3)](#1.3)

the expressionT​::​now() is well-formed when treated as an unevaluated operand[.](#1.sentence-2)

[2](#2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/time.tex#L1231)

The behavior of a program that adds specializations for is_clock is undefined[.](#2.sentence-1)
