std::chrono::operator<<(std::chrono::year_month_weekday)

template <class CharT, class Traits>

std::basic_ostream<CharT, Traits>&
operator<<(std::basic_ostream<CharT, Traits>& os,

           const std::chrono::year_month_weekday& ymwd);
(C++20 起)

输出 ymwd 的文本表示到 os 中,如同用

os << std::format(os.getloc(), STATICALLY_WIDEN<CharT>("{}/{}/{}"),
                  ymwd.year(), ymwd.month(), ymwdl.weekday_indexed());

其中 STATICALLY_WIDEN<CharT>("...")CharTchar 则为 "..." ,而若 CharTwchar_t 则为 L"..."

返回值

os

参阅

(C++20)
在新 string 中存储参数的格式化表示
(函数模板)
std::formatter 的特化,按照提供的格式格式化 year_month_day
(类模板特化)