diff --git a/date.h b/date.h index a9586e8..7fb1866 100644 --- a/date.h +++ b/date.h @@ -3688,7 +3688,7 @@ class time_of_day_storage, detail::classify:: public: using precision = std::chrono::hours; - CONSTCD11 explicit time_of_day_storage() NOEXCEPT = default; + CONSTCD11 time_of_day_storage() NOEXCEPT = default; CONSTCD11 explicit time_of_day_storage(std::chrono::hours since_midnight) NOEXCEPT : base(since_midnight, since_midnight < std::chrono::hours{0}, is24hr) @@ -3758,7 +3758,7 @@ class time_of_day_storage, detail::classify:: public: using precision = std::chrono::minutes; - CONSTCD11 explicit time_of_day_storage() NOEXCEPT + CONSTCD11 time_of_day_storage() NOEXCEPT : base() , m_(0) {} @@ -3837,7 +3837,7 @@ class time_of_day_storage, detail::classify:: public: using precision = std::chrono::seconds; - CONSTCD11 explicit time_of_day_storage() NOEXCEPT + CONSTCD11 time_of_day_storage() NOEXCEPT : base() , m_(0) , s_() @@ -3939,7 +3939,7 @@ private: dfs s_; public: - CONSTCD11 explicit time_of_day_storage() NOEXCEPT + CONSTCD11 time_of_day_storage() NOEXCEPT : base() , m_(0) , s_() @@ -4035,8 +4035,17 @@ class time_of_day using base = detail::time_of_day_storage; public: #if !(defined(_MSC_VER) && !defined(__clang__)) - // C++11 - using base::base; + CONSTCD11 time_of_day() NOEXCEPT = default; + + CONSTCD11 explicit time_of_day(Duration since_midnight) NOEXCEPT + : base(since_midnight) + {} + + template + CONSTCD11 + explicit time_of_day(Arg0&& arg0, Arg1&& arg1, Args&& ...args) NOEXCEPT + : base(std::forward(arg0), std::forward(arg1), std::forward(args)...) + {} #else // MS cl compiler workaround. template diff --git a/tz.h b/tz.h index c13b280..10ec2a1 100644 --- a/tz.h +++ b/tz.h @@ -284,16 +284,21 @@ public: zoned_time(const time_zone* z, const local_time& tp); zoned_time(const std::string& name, const local_time& tp); + zoned_time(const char* name, const local_time& tp); zoned_time(const time_zone* z, const local_time& tp, choose c); zoned_time(const std::string& name, const local_time& tp, choose c); + zoned_time(const char* name, const local_time& tp, choose c); zoned_time(const time_zone* z, const zoned_time& zt); zoned_time(const std::string& name, const zoned_time& zt); + zoned_time(const char* name, const zoned_time& zt); zoned_time(const time_zone* z, const zoned_time& zt, choose); zoned_time(const std::string& name, const zoned_time& zt, choose); + zoned_time(const char* name, const zoned_time& zt, choose); zoned_time(const time_zone* z, const sys_time& st); zoned_time(const std::string& name, const sys_time& st); + zoned_time(const char* name, const sys_time& st); zoned_time& operator=(const sys_time& st); zoned_time& operator=(const local_time& ut); @@ -806,6 +811,14 @@ zoned_time::zoned_time(const std::string& name) : zoned_time(locate_zone(name)) {} +template +template +inline +zoned_time::zoned_time(const zoned_time& zt) NOEXCEPT + : zone_(zt.zone_) + , tp_(zt.tp_) + {} + template inline zoned_time::zoned_time(const time_zone* z, const local_time& t) @@ -819,6 +832,12 @@ zoned_time::zoned_time(const std::string& name, const local_time +inline +zoned_time::zoned_time(const char* name, const local_time& t) + : zoned_time(locate_zone(name), t) + {} + template inline zoned_time::zoned_time(const time_zone* z, const local_time& t, @@ -835,11 +854,10 @@ zoned_time::zoned_time(const std::string& name, const local_time -template inline -zoned_time::zoned_time(const zoned_time& zt) NOEXCEPT - : zone_(zt.zone_) - , tp_(zt.tp_) +zoned_time::zoned_time(const char* name, const local_time& t, + choose c) + : zoned_time(locate_zone(name), t, c) {} template @@ -855,6 +873,12 @@ zoned_time::zoned_time(const std::string& name, const zoned_time +inline +zoned_time::zoned_time(const char* name, const zoned_time& zt) + : zoned_time(locate_zone(name), zt) + {} + template inline zoned_time::zoned_time(const time_zone* z, const zoned_time& zt, choose) @@ -868,6 +892,13 @@ zoned_time::zoned_time(const std::string& name, : zoned_time(locate_zone(name), zt, c) {} +template +inline +zoned_time::zoned_time(const char* name, + const zoned_time& zt, choose c) + : zoned_time(locate_zone(name), zt, c) + {} + template inline zoned_time::zoned_time(const time_zone* z, const sys_time& st) @@ -881,6 +912,11 @@ zoned_time::zoned_time(const std::string& name, const sys_time +inline +zoned_time::zoned_time(const char* name, const sys_time& st) + : zoned_time(locate_zone(name), st) + {} template inline