Closed wg21bot closed 4 years ago
Each std-defined clock has a nested type rep
. For each clock, this type is defined to be either "a signed arithmetic type", or "unspecified". For each clock that is specified to have a signed arithmetic rep
, the intention is that they support negative time_point
s.
The clocks with a signed arithmetic rep
are:
system_clock
utc_clock
tai_clock
gps_clock
file_clock
The clocks with an unspecified rep
are:
steady_clock
high_resolution_clock
Note that for the clocks in this latter group, rep
is not completely unspecified. These clocks still have to meet the Cpp17Clock requirements [time.clock.req] which specifies rep
to be:
An arithmetic type or a class emulating an arithmetic type
Reviewed by LWG small group on Monday morning.
Issue moved to ready as of 2019-11-07
Wording for clocks should be unified unless they are intended to behave differently In 27.7.1.1 note 1 for system_clock it is stated "Objects of type system_clock represent wall clock time from the system-wide realtime clock. Objects of type sys_time<Duration> measure time since (and before) 1970-01-01 00:00:00 UTC" The express statement of "since (and before)" is important given the time epoch of these clocks. If all the clocks support time prior to their zero-time then this should be stated explicitly. If not then likewise that should be noted. No change is proposed yet, clarification required over the intended behaviour when using values prior to a given clock's epoch is needed before the appropriate change can be suggested.
Proposed change: Unify the wording