summaryrefslogtreecommitdiff
path: root/test/std/utilities/time/time.point/time.point.special/max.pass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/std/utilities/time/time.point/time.point.special/max.pass.cpp')
-rw-r--r--test/std/utilities/time/time.point/time.point.special/max.pass.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/std/utilities/time/time.point/time.point.special/max.pass.cpp b/test/std/utilities/time/time.point/time.point.special/max.pass.cpp
index 6bba6fc827876..85447ea414c30 100644
--- a/test/std/utilities/time/time.point/time.point.special/max.pass.cpp
+++ b/test/std/utilities/time/time.point/time.point.special/max.pass.cpp
@@ -11,15 +11,21 @@
// time_point
-// static constexpr time_point max();
+// static constexpr time_point max(); // noexcept after C++17
#include <chrono>
#include <cassert>
+#include "test_macros.h"
+
int main()
{
typedef std::chrono::system_clock Clock;
typedef std::chrono::milliseconds Duration;
typedef std::chrono::time_point<Clock, Duration> TP;
+ LIBCPP_ASSERT_NOEXCEPT(TP::max());
+#if TEST_STD_VER > 17
+ ASSERT_NOEXCEPT( TP::max());
+#endif
assert(TP::max() == TP(Duration::max()));
}