std::common_type(std::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)
确定一组类型的共用类型
(类模板)

版本历史

  • (当前 | 先前 2017年10月10日 (二) 10:36Fruderica讨论 | 贡献. . (886字节) (-544). . (撤销)
  • 当前 | 先前 2014年10月26日 (日) 16:42P12bot讨论 | 贡献 . . (1,430字节) (0). . (Fix some translations) (撤销)
  • 当前 | 先前 2013年7月2日 (二) 07:22P12bot讨论 | 贡献 . . (1,430字节) (+8). . (Use {{lc}}. Update links. Various fixes.) (撤销)
  • 当前 | 先前 2012年11月2日 (五) 14:50P12bot讨论 | 贡献 . . (1,422字节) (+329). . (r2.7.3) (机器人添加:de, en, es, fr, it, ja, pt, ru) (撤销)
  • 当前 | 先前 2012年10月26日 (五) 09:51P12讨论 | 贡献 . . (1,093字节) (0). . (1个修订: Translate from the English version) (撤销)
  • 当前 | 先前 2012年10月26日 (五) 06:00TranslationBot讨论 | 贡献. . (1,093字节) (-18). . (Translated from the English version using Google Translate) (撤销)
  • 当前 | 先前 2012年10月25日 (四) 13:15P12讨论 | 贡献 . . (1,111字节) (0). . (1个修订: Translate from the English version) (撤销)
  • 当前 | 先前) 2012年10月25日 (四) 12:00TranslationBot讨论 | 贡献. . (1,111字节) (+1,111). . (Translated from the English version using Google Translate)