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

--- Comment #10 from Kan Liu <kan.liu.229 at gmail dot com> ---
(In reply to Jonathan Wakely from comment #9)
> I can see one good reason to implement those operators as templates: it
> allows us to check if the literal value overflows the duration::rep type,
> which is required by the standard but impossible to implement without using
> templates.

_Select_type already does the overflow check, so *template implemented
operators* is still redundant I think. Since the standard units (std::hours,
milliseconds ...) requires the duration::rep to be *int64_t*, there's no need
to do too much check.

Reply via email to