• Class / Function / Type

      std::
    • Header file

      <>
    • Other / All

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

    履歴 編集

    function
    <chrono>

    std::chrono::year::max

    static constexpr year max() noexcept; // (1) C++20
    

    概要

    yearクラスが扱える最大値を取得する。

    戻り値

    year{32767}

    #include <iostream>
    #include <chrono>
    
    namespace chrono = std::chrono;
    
    int main()
    {
      std::cout << chrono::years::max() << std::endl;
    }
    

    出力

    32767
    

    バージョン

    言語

    • C++20

    処理系