Re: [PATCH] Replace non-constexpr decrement in std::chrono::floor

2016-10-13 Thread Jonathan Wakely
On 13/10/16 15:24 +0100, Jonathan Wakely wrote: Decrementing a duration is not constexpr (yet ... I made an NB comment about it). I'm not sure if these functions are correct for floating-point durations, because we could end up with a duration which is very very slightly lower of higher than

[PATCH] Replace non-constexpr decrement in std::chrono::floor

2016-10-13 Thread Jonathan Wakely
Decrementing a duration is not constexpr (yet ... I made an NB comment about it). I'm not sure if these functions are correct for floating-point durations, because we could end up with a duration which is very very slightly lower of higher than the desired value, but then we subtract 1.0 from