std::chrono...th_weekday)(3)
πΈ NAME πΈ
okay so bestie, you've landed on the std::chrono::operator<<(std::chrono::year_month_weekday)(3) page from the C++ Standard Library β¨.
std::chrono::operator<<(std::chrono::year_month_weekday) β that's the function we're hyping up today π
.
β¨ Synopsis β¨
Defined in header <chrono> π.
(since C++20) β yes, this overload is a C++20 girlie, no cap.
template< class CharT, class Traits >
std::basic_ostream<CharT, Traits>&
operator<<( std::basic_ostream<CharT, Traits>& os,
const std::chrono::year_month_weekday& ymwd );
π what it actually does π
It outputs a textual representation of ymwd into os, as if by this exact little ritual π₯:
os << std::format(os.getloc(),
STATICALLY_WIDEN<CharT>("{}/{:L}/{:L}"),
ymwd.year(), ymwd.month(), ymwd.weekday_indexed());
where STATICALLY_WIDEN<CharT>("{}/{:L}/{:L}") is "{}/{:L}/{:L}" if CharT is char, and L"{}/{:L}/{:L}" if CharT is wchar_t π«Ά.
π Return value π
os β that's it, she returns the stream, periodt π
.
π Defect reports π
The following behavior-changing defect reports were applied retroactively to previously published C++ standards. yes, the lore goes back π.
- DR:
P2372R3β Applied to: C++20. Behavior as published: the given locale was used by default. Correct behavior:Lis needed to use the given locale.
π¦ See also π¦
format(C++20)β stores formatted representation of the arguments in a new string (function template).std::formatter<std::chrono::year_month_day>(C++20)β formatting support foryear_month_day(class template specialization).
mwah π page fresh from http://cppreference.com, dated 2024.06.10 β xoxo, your chrono bestie π«Ά
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms