• Class / Function / Type

      std::
    • Header file

      <>
    • Other / All

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

    履歴 編集

    function
    <chrono>

    std::chrono::month_day_last::ok

    constexpr bool ok() const noexcept; // (1) C++20
    

    概要

    month_day_lastオブジェクトの値が有効な月の範囲内かを判定する。

    戻り値

    以下の条件を満たす場合にこの関数はtrueを返し、そうでなければfalseを返す:

    #include <cassert>
    #include <chrono>
    
    namespace chrono = std::chrono;
    
    int main()
    {
      assert((chrono::March/chrono::last).ok() == true);
    }
    

    出力

    バージョン

    言語

    • C++20

    処理系