• Class / Function / Type

      std::
    • Header file

      <>
    • Other / All

    最終更新日時(UTC):
    が更新

    履歴 編集

    function
    <chrono>

    std::chrono::time_point::max

    static constexpr time_point max();          // C++11
    static constexpr time_point max() noexcept; // C++20
    

    概要

    最大のtime_pointを取得

    戻り値

    time_point(duration::max())
    

    #include <iostream>
    #include <chrono>
    
    using namespace std::chrono;
    
    int main()
    {
      time_point<system_clock> p = time_point<system_clock>::max();
    
      std::cout << p.time_since_epoch().count() << std::endl;
    }
    

    出力例

    9223372036854775807
    

    バージョン

    言語

    • C++11

    処理系

    参照