命名空间
变体
操作

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

来自 cppreference.cn
< 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>>;
(C++11 起)

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

目录

[edit] 成员类型

成员类型 定义
类型 std::chrono::time_point<Clock, typename std::common_type<Duration1, Duration2>::type>

[edit] 注意

两种 std::chrono::time_point 类型的公共类型是具有相同时钟的 std::chrono::time_point,其持续时间是它们各自持续时间的 std::common_type

[edit] 示例

[edit] 参阅

特化 std::common_type 特性
(类模板特化) [edit]
确定一组类型的公共类型
(类模板) [edit]