• Class / Function / Type

      std::
    • Header file

      <>
    • Other / All

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

    履歴 編集

    function
    <chrono>

    std::chrono::duration_values::zero

    static constexpr Rep zero();          // C++11
    static constexpr Rep zero() noexcept; // C++20
    

    概要

    Rep型の初期値を取得する

    戻り値

    Rep(0)
    

    #include <iostream>
    #include <chrono>
    
    using namespace std::chrono;
    
    int main()
    {
      std::cout << duration_values<seconds::rep>::zero() << std::endl;
    }
    

    出力

    0
    

    バージョン

    言語

    • C++11

    処理系

    参照