名前空間
変種
操作

std::chrono::operator<<(std::chrono::weekday)

提供: cppreference.com
< cpp‎ | chrono‎ | weekday
 
 
ユーティリティライブラリ
汎用ユーティリティ
日付と時間
関数オブジェクト
書式化ライブラリ (C++20)
(C++11)
関係演算子 (C++20で非推奨)
整数比較関数
(C++20)
スワップと型操作
(C++14)
(C++11)
(C++11)
(C++11)
(C++17)
一般的な語彙の型
(C++11)
(C++17)
(C++17)
(C++17)
(C++17)

初等文字列変換
(C++17)
(C++17)
 
日付と時間のユーティリティ
(C++11)
(C++11)
時刻
(C++20)



(C++20)(C++20)(C++20)(C++20)
時計
(C++20)
                                             
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
カレンダー
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
タイムゾーン
(C++20)
(C++20)
(C++20)
(C++20)
C スタイルの日付と時間
 
 
template <class CharT, class Traits>

std::basic_ostream<CharT, Traits>&

operator<<(std::basic_ostream<CharT, Traits>& os, const std::chrono::weekday& wd);
(C++20以上)

!wd.ok() の場合は、 unsigned(wd) の後に " is not a valid weekday" が続いたものを os に挿入します。 そうでなければ、 os に紐付けられているロケールを使用して決定された、 wd が表す曜日の名前の省略形から std::basic_string<CharT> を形成し、それを os に挿入します。

これは以下と同等です。

return os << (wd.ok() ?
    std::format(os.getloc(), STATICALLY_WIDEN<CharT>("{:%a}"), wd) :
    std::format(os.getloc(), STATICALLY_WIDEN<CharT>("{} is not a valid weekday"), unsigned(wd)));

ただし STATICALLY_WIDEN<CharT>("...")CharTchar の場合は "..."wchar_t の場合は L"..." です。

[編集] 戻り値

os

[編集] 関連項目

(C++20)
引数の書式化された表現を新しい文字列に格納します
(関数テンプレート) [edit]
提供された書式に従って weekday を書式化する std::formatter の特殊化
(クラステンプレートの特殊化) [edit]