You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mandates:SourceClock::to_utc(t) returns a utc_time<Duration>, where Duration is a valid chrono::duration specialization.
Confusingly, the Duration that this operator() is templated on, is not the same as the Duration in the return type! What this means to say is:
Mandates:SourceClock::to_utc(t) returns a utc_time<Duration2>, where Duration2 is a valid chrono::duration specialization.
Attempting to static_assert that this operator() returns utc_time<Duration> matching the template parameter exactly, will fail to compile (observe that [time.clock.tai.overview] specifies that tai_clock::to_utc() returns utc_time<common_type_t<Duration, seconds>>). Which just happened to me, hence the issue. While I was confused by the wording, the intent seems clear upon a re-read, and I believe that this is an editorial issue, not an LWG issue. Thanks to @MattStephanson for diagnosing this and explaining it to me.
This occurs 4 times:
[time.clock.cast.sys]/2
[time.clock.cast.sys]/5
[time.clock.cast.utc]/2
[time.clock.cast.utc]/5
The text was updated successfully, but these errors were encountered:
N4885 [time.clock.cast.utc]/2:
Confusingly, the
Duration
that thisoperator()
is templated on, is not the same as theDuration
in the return type! What this means to say is:Mandates:
SourceClock::to_utc(t)
returns autc_time<Duration2>
, whereDuration2
is a validchrono::duration
specialization.Attempting to
static_assert
that thisoperator()
returnsutc_time<Duration>
matching the template parameter exactly, will fail to compile (observe that [time.clock.tai.overview] specifies thattai_clock::to_utc()
returnsutc_time<common_type_t<Duration, seconds>>
). Which just happened to me, hence the issue. While I was confused by the wording, the intent seems clear upon a re-read, and I believe that this is an editorial issue, not an LWG issue. Thanks to @MattStephanson for diagnosing this and explaining it to me.This occurs 4 times:
The text was updated successfully, but these errors were encountered: