命名空间
变体
操作

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 起)

公开名为 type 的类型,它是两个 std::chrono::time_point 的公共类型。

目录

[edit] 成员类型

成员类型 定义
type 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]