std::common_type(std::chrono::duration) (3) - Linux Manuals
std::common_type(std::chrono::duration): std::common_type(std::chrono::duration)
NAME
std::common_type(std::chrono::duration) - std::common_type(std::chrono::duration)
Synopsis
template <class Rep1, class Period1, class Rep2, class Period2>
struct common_type<std::chrono::duration<Rep1, Period1>,
std::chrono::duration<Rep2, Period2>> { (since C++11)
typedef std::chrono::duration<
typename std::common_type<Rep1, Rep2>::type, /*see note*/> type;
};
Exposes the type named type, which is the common type of two std::chrono::durations.
Note
The period of the resulting duration is the greatest common divisor of Period1 and Period2.
Example
// Run this code
Output:
See also
common_type determines the common type of a group of types
(C++11)