std::chrono::operator<< (std::chrono::year_month)
来自cppreference.com
< cpp | chrono | year month
| template< class CharT, class Traits > std::basic_ostream<CharT, Traits>& |
(C++20 起) | |
输出 ym 的文本表示到流 os 中,如同用
os << std::format(os.getloc(), STATICALLY_WIDEN<CharT>("{}/{}"), ym.year(), ym.month())
其中 STATICALLY_WIDEN<CharT>("...") 若 CharT 为 char 则为 "..." ,而若 CharT 为 wchar_t 则为 L"..." 。
返回值
os 。
参阅
| (C++20) |
在新 string 中存储参数的格式化表示 (函数模板) |
std::formatter 的特化,按照提供的格式格式化 year_month (类模板特化) |