diff --git a/include/date/tz.h b/include/date/tz.h index db39880..0589a6f 100644 --- a/include/date/tz.h +++ b/include/date/tz.h @@ -2205,8 +2205,8 @@ template<> struct clock_time_conversion { template - auto operator()(const std::chrono::time_point& st) - -> std::chrono::time_point + auto operator()(const sys_time& st) const + -> sys_time { return st; } @@ -2216,10 +2216,10 @@ template<> struct clock_time_conversion { template - auto operator()(const std::chrono::time_point& st) - -> std::chrono::time_point + auto operator()(const utc_time& ut) const + -> utc_time { - return st; + return ut; } }; @@ -2249,17 +2249,17 @@ template struct clock_time_conversion { template - auto operator()(const std::chrono::time_point& st) + auto operator()(const std::chrono::time_point& tp) const -> std::chrono::time_point { - return st; + return tp; } }; namespace ctc_detail { //Check if TimePoint is time for given clock, - //if not emits hard errorf + //if not emits hard error template struct return_clock_time { @@ -2314,10 +2314,10 @@ template struct clock_time_conversion { template - auto operator()(const std::chrono::time_point& st) + auto operator()(const std::chrono::time_point& tp) const -> typename ctc_detail::return_to_sys::type { - return SourceClock::to_sys(st); + return SourceClock::to_sys(tp); } }; @@ -2325,7 +2325,7 @@ template struct clock_time_conversion { template - auto operator()(const std::chrono::time_point& st) + auto operator()(const sys_time& st) const -> typename ctc_detail::return_from_sys::type { return DestClock::from_sys(st); @@ -2336,10 +2336,10 @@ template struct clock_time_conversion { template - auto operator()(const std::chrono::time_point& st) + auto operator()(const std::chrono::time_point& tp) const -> typename ctc_detail::return_to_utc::type { - return SourceClock::to_utc(st); + return SourceClock::to_utc(tp); } }; @@ -2347,7 +2347,7 @@ template struct clock_time_conversion { template - auto operator()(const std::chrono::time_point& ut) + auto operator()(const utc_time& ut) const -> typename ctc_detail::return_from_utc::type { return DestClock::from_utc(ut);