std::chrono...::month_day)(3)
π NAME π
Page title: std::chrono...::month_day)(3). Manual name: C++ Standard Libary β yes bestie, that's the spelling in the header, we're not fixing it β¨.
std::chrono::operator<<(std::chrono::month_day) - std::chrono::operator<<(std::chrono::month_day)
Lowkey it's the std::chrono::month_day stream insertion operator, and the name section is just saying that exact thing twice. Iconic, honestly. π
π¦ Synopsis π¦
Defined in header <chrono>, no cap.
Defined in header <chrono>
template< class CharT, class Traits >
std::basic_ostream<CharT, Traits>&
(since C++20)
operator<<( std::basic_ostream<CharT, Traits>& os, const
std::chrono::month_day& md );
It's a function template since C++20, and it outputs a textual representation of md into the stream os, as if by:
os << std::format(os.getloc(), STATICALLY_WIDEN<CharT>("{:L}/{}"),
md.month(),
md.day())
where STATICALLY_WIDEN<CharT>("{:L}/{}") is "{:L}/{}" if CharT is char, and L"{:L}/{}" if CharT is wchar_t. That's the whole sauce. π«Ά
π Return value π
os. That's it. It just returns os, like a good little stream. periodt. π
πΈ Example πΈ
This section is incomplete Reason: no example
Not me finding zero examples in the building π. The page literally says it's incomplete and the reason is no example.
π₯ Defect reports π₯
The following behavior-changing defect reports were applied retroactively to previously published C++ standards.
- 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::month_day>(C++20) β formatting support formonth_day(class template specialization)
π Category π
* Todo no example
xoxo, source/version: http://cppreference.com; dated 2024.06.10; page title: std::chrono...::month_day)(3) π
π¦ 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