mirror of
https://github.com/HowardHinnant/date.git
synced 2024-12-26 07:53:16 +08:00
Remove noexcept from tai_clock::now() and gps_clock::now()
* These functions may try to initialize the tzdb which could fail.
This commit is contained in:
parent
f3741d68ff
commit
9b88763dbf
@ -1987,7 +1987,7 @@ public:
|
||||
using time_point = std::chrono::time_point<tai_clock>;
|
||||
static const bool is_steady = false;
|
||||
|
||||
static time_point now() NOEXCEPT;
|
||||
static time_point now();
|
||||
|
||||
template<typename Duration>
|
||||
static
|
||||
@ -2029,7 +2029,7 @@ tai_clock::from_utc(const utc_time<Duration>& 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<gps_clock>;
|
||||
static const bool is_steady = false;
|
||||
|
||||
static time_point now() NOEXCEPT;
|
||||
static time_point now();
|
||||
|
||||
template<typename Duration>
|
||||
static
|
||||
@ -2140,7 +2140,7 @@ gps_clock::from_utc(const utc_time<Duration>& t) NOEXCEPT
|
||||
|
||||
inline
|
||||
gps_clock::time_point
|
||||
gps_clock::now() NOEXCEPT
|
||||
gps_clock::now()
|
||||
{
|
||||
using namespace std::chrono;
|
||||
return from_utc(utc_clock::now());
|
||||
|
Loading…
x
Reference in New Issue
Block a user