-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
bugSomething isn't workingSomething isn't workingfixedSomething works now, yay!Something works now, yay!
Description
In header <chrono>
, line
Line 3392 in 2787718
if (treat_as_floating_point_v<_DurationType> // |
_Apply_duration_fields
, an if condition contains the expressiontreat_as_floating_point_v<_DurationType>
where _DurationType
represents a std::chrono::duration
specialization. But std::chrono::treat_as_floating_point_v
([time.traits.is.fp]) doesn't expect a duration, but performs the test directly on the provided type (usually the representation type of a duration), so this part of the if condition will always evaluate to false
, unless a programmer would specialize a duration with a user-provided period or representation type for std::chrono::treat_as_floating_point
, which seems unlikely. It seems to me that the mentioned code location intended to use treat_as_floating_point_v<typename _DurationType::rep>
instead.StephanTLavavej
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingfixedSomething works now, yay!Something works now, yay!