Namespaces
Variants
Views
Actions

std::common_type(std::chrono::time_point)

From cppreference.com
< cpp‎ | chrono‎ | time point
Revision as of 18:27, 9 July 2013 by P12bot (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
template <class Clock, class Duration1, class Duration2>

struct common_type<std::chrono::time_point<Clock, Duration1>,
                   std::chrono::time_point<Clock, Duration2>> {
    typedef std::chrono::time_point<
        Clock, typename std::common_type<Duration1, Duration2>::type> type;

};
(since C++11)

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

[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

deduces the result type of a mixed-mode arithmetic expression
(class template) [edit]