P0972R0 <chrono> zero(), min(), and max() should be noexcept
authorJonathan Wakely <jwakely@redhat.com>
Fri, 11 Jan 2019 23:41:05 +0000 (23:41 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Fri, 11 Jan 2019 23:41:05 +0000 (23:41 +0000)
commit5e9aed14dcb5c984186f8b1e042bde9f3aaafa5e
tree61967e9e3bcec9ac2316154f7963b57bd7093a4f
parent89508a3fc645ef37340e31c74995c3078e1b1b9b
P0972R0 <chrono> zero(), min(), and max() should be noexcept

This paper has been included in the C++20 draft, but the changes to add
noexcept can be made unconditionally, to apply for C++11 too.

* include/std/chrono (duration_values::zero(), duration_values::min())
(duration_values::max()): Add noexcept.
(duration::zero(), duration::min(), duration::max()): Likewise.
(time_point::zero(), time_point::min(), time_point::max()): Likewise.
* testsuite/20_util/duration/requirements/noexcept.cc: New test.
* testsuite/20_util/time_point/requirements/noexcept.cc: New test.

From-SVN: r267865
libstdc++-v3/ChangeLog
libstdc++-v3/include/std/chrono
libstdc++-v3/testsuite/20_util/duration/requirements/noexcept.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/time_point/requirements/noexcept.cc [new file with mode: 0644]