• Class / Function / Type

      std::
    • Header file

      <>
    • Other / All

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

    履歴 編集

    function
    <chrono>

    std::chrono::operator<<

    namespace std::chrono {
      template <class charT, class traits>
      std::basic_ostream<charT, traits>&
        operator<<(std::basic_ostream<charT, traits>& os, const year_month_day_last& ymdl); // (1) C++20
    }
    

    概要

    year_month_day_lastオブジェクトを出力ストリームに出力する。

    戻り値

    便宜上のリテラルキャストSTATICALLY-WIDENを導入する。STATICALLY-WIDEN<charT>("...")は、charTcharである場合は"..."charTwchar_tである場合はL"..."を意味する。

    #include <iostream>
    #include <chrono>
    
    using std::chrono::last;
    using namespace std::chrono_literals;
    
    int main()
    {
      std::cout << 2020y/2/last << std::endl;
    }
    

    出力

    2020/Feb/last
    

    バージョン

    言語

    • C++20

    処理系

    関連項目

    参照