diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2016-10-13 15:42:09 +0100 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2016-10-13 15:42:09 +0100 |
commit | 0c0d2a4cf0fbad6cb92dcf666b24fde8fac8b104 (patch) | |
tree | e1a197ea433d14b95632dbcdf821e6c1c8e8bb6f /libstdc++-v3/include/std | |
parent | 4d0cdd0ce64e8821ad218054ccd317f195eb3cc8 (diff) | |
download | gcc-0c0d2a4cf0fbad6cb92dcf666b24fde8fac8b104.zip gcc-0c0d2a4cf0fbad6cb92dcf666b24fde8fac8b104.tar.gz gcc-0c0d2a4cf0fbad6cb92dcf666b24fde8fac8b104.tar.bz2 |
Replace non-constexpr decrement in std::chrono::floor
* include/std/chrono (floor): Replace non-constexpr operation.
* testsuite/20_util/duration_cast/rounding.cc: Test conversion to
durations with floating pointer representations.
From-SVN: r241122
Diffstat (limited to 'libstdc++-v3/include/std')
-rw-r--r-- | libstdc++-v3/include/std/chrono | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libstdc++-v3/include/std/chrono b/libstdc++-v3/include/std/chrono index cb8c876..ceae7f8 100644 --- a/libstdc++-v3/include/std/chrono +++ b/libstdc++-v3/include/std/chrono @@ -224,7 +224,7 @@ _GLIBCXX_END_NAMESPACE_VERSION { auto __to = chrono::duration_cast<_ToDur>(__d); if (__to > __d) - --__to; + return __to - _ToDur{1}; return __to; } |