Namespaces
Variants
Views
Actions

std::common_type<std::chrono::time_point>

From cppreference.com
< cpp‎ | chrono‎ | time point
 
 
Utilities library
Language support
Type support (basic types, RTTI)
Library feature-test macros (C++20)
Dynamic memory management
Program utilities
Coroutine support (C++20)
Variadic functions
Debugging support
(C++26)
Three-way comparison
(C++20)
(C++20)(C++20)(C++20)
(C++20)(C++20)(C++20)
General utilities
Date and time
Function objects
Formatting library (C++20)
(C++11)
Relational operators (deprecated in C++20)
Integer comparison functions
(C++20)(C++20)(C++20)   
(C++20)
Swap and type operations
(C++14)
(C++11)
(C++11)
(C++11)
(C++17)
Common vocabulary types
(C++11)
(C++17)
(C++17)
(C++17)
(C++11)
(C++17)
(C++23)
Elementary string conversions
(C++17)
(C++17)

 
 
 
template< class Clock, class Duration1, class Duration2 >

struct common_type<std::chrono::time_point<Clock, Duration1>,

                   std::chrono::time_point<Clock, Duration2>>;
(since C++11)

Exposes the type named type, which is the common type of two std::chrono::time_points.

Contents

[edit] Member types

Member type Definition
type std::chrono::time_point<Clock, typename std::common_type<Duration1, Duration2>::type>

[edit] 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 of their durations.

[edit] Example

[edit] See also

specializes the std::common_type trait
(class template specialization) [edit]
determines the common type of a group of types
(class template) [edit]