GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
std::chrono::clock_cast(3) C++ Standard Libary std::chrono::clock_cast(3)

std::chrono::clock_cast - std::chrono::clock_cast


Defined in header <chrono>
template <class Dest, class Source, class Duration> (since C++20)
auto clock_cast(const std::chrono::time_point<Source, Duration>& t);


Converts the time point t of a clock Source to an equivalent time point of the clock
Dest, using std::chrono::system_clock and/or std::chrono::utc_clock as
intermediaries if necessary.


* If the expression std::chrono::clock_time_conversion<Dest, Source>{}(t) is
well-formed, returns the result of that expression.
* Otherwise, if at least one of the following two expressions are well-formed,
then


* If both expressions are well-formed, the conversion is ambiguous, and
the program is ill-formed.
* Otherwise, exactly one of the two expressions is well-formed; the
result of that expression is returned.


1) std::chrono::clock_time_conversion<Dest, std::chrono::system_clock>{}(
std::chrono::clock_time_conversion<std::chrono::system_clock, Source>{}(t))
2) std::chrono::clock_time_conversion<Dest, std::chrono::utc_clock>{}(
std::chrono::clock_time_conversion<std::chrono::utc_clock, Source>{}(t))


* Otherwise, if at least one of the following two expressions are well-formed,
then


* If both expressions are well-formed, the conversion is ambiguous, and
the program is ill-formed.
* Otherwise, exactly one of the two expressions is well-formed; the
result of that expression is returned.


1) std::chrono::clock_time_conversion<Dest, std::chrono::utc_clock>{}(


std::chrono::clock_time_conversion<std::chrono::utc_clock,
std::chrono::system_clock>{}(


std::chrono::clock_time_conversion<std::chrono::system_clock, Source>{}(t)))
2) std::chrono::clock_time_conversion<Dest, std::chrono::system_clock>{}(


std::chrono::clock_time_conversion<std::chrono::system_clock,
std::chrono::utc_clock>{}(


std::chrono::clock_time_conversion<std::chrono::utc_clock, Source>{}(t)))


* Otherwise, this function does not participate in overload resolution.


The result of the conversion, determined as described above.


This section is incomplete
Reason: no example


clock_time_conversion traits class defining how to convert time points of one clock
(C++20) to another
(class template)

2022.07.31 http://cppreference.com

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.