class template
<chrono>
std::chrono::common_type (duration)
template <class Rep1, class Period1, class Rep2, class Period2>class common_type<chrono::duration<Rep1,Period1>,chrono::duration<Rep2,Period2>>;
Specialization of common_type for duration
This is a specialization of the standard traits class common_type. It defines the most precise duration type between its two template arguments.
The default definition returns a duration type with common_type<Rep1,Rep2> as its first template argument and the greatest common divisor of Period1 and Period2 as its second template argument.
A custom count representation type can provide its own specialization of this template.
Template parameters
- Rep1, Rep2
- Count representation types.
These can either be arithmetic types, or classes emulating an arithmetic type.
- Period1, Period2
- Instantiations of the ratio class template that represent the count period in seconds.
Member types
member type | definition |
type | The most precise duration common type. |