From 9b88763dbf633198a35d804b957493c746a807dd Mon Sep 17 00:00:00 2001 From: Howard Hinnant Date: Sun, 26 Nov 2017 21:24:45 -0500 Subject: [PATCH] Remove noexcept from tai_clock::now() and gps_clock::now() * These functions may try to initialize the tzdb which could fail. --- include/date/tz.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/date/tz.h b/include/date/tz.h index 040c122..960bd7f 100644 --- a/include/date/tz.h +++ b/include/date/tz.h @@ -1987,7 +1987,7 @@ public: using time_point = std::chrono::time_point; static const bool is_steady = false; - static time_point now() NOEXCEPT; + static time_point now(); template static @@ -2029,7 +2029,7 @@ tai_clock::from_utc(const utc_time& t) NOEXCEPT inline tai_clock::time_point -tai_clock::now() NOEXCEPT +tai_clock::now() { using namespace std::chrono; return from_utc(utc_clock::now()); @@ -2097,7 +2097,7 @@ public: using time_point = std::chrono::time_point; static const bool is_steady = false; - static time_point now() NOEXCEPT; + static time_point now(); template static @@ -2140,7 +2140,7 @@ gps_clock::from_utc(const utc_time& t) NOEXCEPT inline gps_clock::time_point -gps_clock::now() NOEXCEPT +gps_clock::now() { using namespace std::chrono; return from_utc(utc_clock::now());