This is an archive of the discontinued LLVM Phabricator instance.

Implement P0972R0: <chrono> zero(), min(), and max() should be noexcept
ClosedPublic

Authored by mclow.lists on Oct 29 2018, 12:31 PM.

Details

Reviewers
ldionne
EricWF
Summary

This paper is up for a vote in San Diego next week.

Note: I marked the calls as noexcept all the time, not just for C++20 - because we have freedom to do that.

Diff Detail

Event Timeline

mclow.lists created this revision.Oct 29 2018, 12:31 PM
EricWF accepted this revision.Oct 29 2018, 12:37 PM

Note: I marked the calls as noexcept all the time, not just for C++20 - because we have freedom to do that.
However, the tests just check when we're building for C++20.

I think this should be subject to the Beyonce rule: If you like the behavior, put a test on it.
I think we should use LIBCPP_ASSERT_NOEXCEPT to test our behavior pre-c++2a.

Other then that, this patch LGTM.

This revision is now accepted and ready to land.Oct 29 2018, 12:37 PM
ldionne accepted this revision.Oct 29 2018, 12:41 PM

LGTM too, but I agree w/ Eric regarding the tests. Also, the link to p0927r2 doesn't seem right.

mclow.lists edited the summary of this revision. (Show Details)

Added libc++-specific tests. Fixed link in summary.

EricWF accepted this revision.Oct 29 2018, 6:12 PM
ldionne accepted this revision.Oct 29 2018, 8:27 PM
mclow.lists closed this revision.Nov 13 2018, 9:25 AM

Committed revision 346766