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

< cpp‎ | chrono‎ | time point
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;

};
(C++11 起)

暴露名为 type 的类型,它是二个 std::chrono::time_point 的公共类型。

注意

二个 std::chrono::time_point 类型的公共类型是 std::chrono::time_point ,拥有与二个类型相同的时钟,及其时长的 std::common_type

示例

参阅

(C++11)
确定一组类型的公共类型
(类模板)