25 Time library [time]

25.7 Clocks [time.clock]

25.7.9 time_­point conversions [time.clock.cast]

25.7.9.4 Conversions between system_­clock and other clocks [time.clock.cast.sys]

template<class SourceClock>
struct clock_time_conversion<system_clock, SourceClock> {
  template<class Duration>
    auto operator()(const time_point<SourceClock, Duration>& t) const
      -> decltype(SourceClock::to_sys(t));
};
template<class Duration> auto operator()(const time_point<SourceClock, Duration>& t) const -> decltype(SourceClock::to_sys(t));
Remarks: This function does not participate in overload resolution unless SourceClock::to_­sys(t) is well-formed.
If SourceClock::to_­sys(t) does not return sys_­time<Duration>, where Duration is a valid chrono::duration specialization, the program is ill-formed.
Returns: SourceClock::to_­sys(t).
template<class DestClock>
struct clock_time_conversion<DestClock, system_clock> {
  template<class Duration>
    auto operator()(const sys_time<Duration>& t) const
      -> decltype(DestClock::from_sys(t));
};
template<class Duration> auto operator()(const sys_time<Duration>& t) const -> decltype(DestClock::from_sys(t));
Remarks: This function does not participate in overload resolution unless DestClock::from_­sys(t) is well-formed.
If DestClock::from_­sys(t) does not return time_­point<DestClock, Duration>, where Duration is a valid chrono::duration specialization, the program is ill-formed.
Returns: DestClock::from_­sys(t).