https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91486

--- Comment #3 from John Salmon <john.salmon at deshaw dot com> ---
I grep'ed the latest devel source tree (git sha: afadff66) for occurrences of
now\(\).  The same bug appears several times in include/experimental/io_context
and include/experimental/timer.

The underlying problem is that operator+(time_point, duration) has well-defined
but surprising and error-prone semantics when duration's Rep is float.  Maybe
it would be better to define a less error-prone helper function, e.g.,

  template<class Clk, class Dur, class Rep, class Period>
  time_point<Clk, Dur> __timepoint_plus_duration(const time_point<Clk, Dur>&,
duration<Rep, Period>&);

and to use it consistently whenever adding a time_point to a duration?

Reply via email to