std::common_type<std::chrono::time_point>
From cppreference.com
< cpp | chrono | time point
C++
Date and time library
| Time point | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Duration | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Clocks | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Time of day | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Calendar | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Time zone | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
chrono I/O | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
(C++20)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| C-style date and time | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::chrono::time_point
| Member functions | ||||
|
(C++20)(C++20)
|
||||
| Non-member functions | ||||
|
(until C++20)(C++20)
|
||||
|
(C++17)
|
||||
|
(C++17)
|
||||
|
(C++17)
|
||||
| Helper classes | ||||
common_type | ||||
|
(C++26)
|
|
template
<
class Clock, class Duration1, class Duration2 >
struct common_type<
std::chrono::time_point
<Clock, Duration1>, |
(since C++11) | |
Exposes the type named type, which is the common type of two std::chrono::time_points.
Member types
| Member type | Definition |
type
|
std::chrono::time_point <Clock, typename std::common_type <Duration1, Duration2> :: type > |
Notes
The common type of two std::chrono::time_point types is a std::chrono::time_point with the same clock as the two types and the std::common_type
Example
| This section is incomplete Reason: no example |
See also
| specializes the std::common_type trait (class template specialization) |
|
|
(C++11)
|
determines the common type of a group of types (class template) |