Showing content from https://en.cppreference.com/w/cpp/algorithm/../chrono/clock_cast.html below:
std::chrono::clock_cast - cppreference.com
template< class Dest, class Source, class Duration >
auto clock_cast( const std::chrono::time_point<Source, Duration>& t ); (since C++20)
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.
- 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.
- Otherwise, this function does not participate in overload resolution.
[edit] Return value
The result of the conversion, determined as described above.
[edit] Example [edit] See also
RetroSearch is an open source project built by @garambo
| Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4