std::chrono...nth_weekday)(3)
π std::chrono::operator<<(std::chrono::month_weekday) β NAME energy β¨
okay bestie, so this is the man page for std::chrono::operator<<(std::chrono::month_weekday), which is literally the same thing as std::chrono::operator<<(std::chrono::month_weekday). yes we're saying it twice, that's the NAME section's whole vibe π
it lives in the C++ Standard Library, manual section 3. cppreference girlies stay winning π
πΈ Synopsis πΈ
first things first, this icon is defined in header <chrono> β don't forget to include it or the compiler will simply not let you have your moment π«Ά
template< class CharT, class Traits >
std::basic_ostream<CharT, Traits>& (since
C++20)
operator<<( std::basic_ostream<CharT, Traits>& os,
const std::chrono::month_weekday& mwd );
since C++20 btw β so if you're on an older standard this is giving nothing but sadness π
what it actually does π¦
it outputs a textual representation of mwd into os, as if by this exact incantation:
os << std::format(os.getloc(), STATICALLY_WIDEN<CharT>("{:L}/{:L}"),
mwd.month(), mwd.weekday_indexed());
and like, what even is that STATICALLY_WIDEN<CharT>("{:L}/{:L}") bestie? it's "{:L}/{:L}" if CharT is char, and L"{:L}/{:L}" if CharT is wchar_t. that's it, that's the whole mystery β¨ (wide chars said "i also deserve a slash")
π Return value π
it returns os. that's it. it gives you back the stream. iconic minimalism, no notes π
π Example π
This section is incomplete Reason: no example
yeahβ¦ we got nothing. the example is a ghost π» the void. an empty group chat. (there's even a category tag for it, see below, and it is so real of them to admit it)
π₯ Defect reports π₯
the following behavior-changing defect reports were applied retroactively to previously published C++ standards. so like, the past got a glow-up π
P2372R3β applied to C++20. Behavior as published: the given locale was used by default. Correct behavior:Lis needed to use the given locale. so basically theLin{:L}is doing the heavy lifting now, no cap π
π See also π
format(C++20) β stores formatted representation of the arguments in a new string β function template π§std::formatter<std::chrono::month>(C++20) β formatting support for month β class template specialization β
π Category π
*Todo no example β yes it's listed as a todo. we been knew π
and that's the whole page, bestie! π this little number comes to you courtesy of http://cppreference.com, version 2024.06.10, dated 2024.06.10, filed under std::chrono...nth_weekday)(3) β mwah, go format some month_weekdays, slay π₯π
π¦ 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