std::chrono...ekday_last)(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

πŸ’– NAME πŸ’–

Bestie, welcome to the C++ Standard Libary page for std::chrono::operator<<(std::chrono::month_weekday_last) β€” yes, that's the manual name with the iconic spelling, and we're keeping it exactly. The NAME line is literally:

std::chrono::operator<<(std::chrono::month_weekday_last) - std::chrono::operator<<(std::chrono::month_weekday_last)

So yeah, same name twice. It's giving main-character energy, and honestly? Obsessed. πŸ’…


✨ Synopsis ✨

Here's the exact signature-and-behavior situation, 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_weekday_last& mwdl );

          Outputs a textual representation of mwdl into os, as if by

          os << std::format(os.getloc(), STATICALLY_WIDEN<CharT>("{:L}/{:L}"),
                            mwdl.month(), mwdl.weekday_last());

          where STATICALLY_WIDEN<CharT>("{:L}/{:L}") is "{:L}/{:L}" if CharT is
       char, and
          L"{:L}/{:L}" if CharT is wchar_t.

So it outputs a textual representation of mwdl into os, as if by that os << std::format(...) call. And the STATICALLY_WIDEN<CharT>("{:L}/{:L}") bit is "{:L}/{:L}" when CharT is char, and L"{:L}/{:L}" when CharT is wchar_t. Slay. πŸ’–


πŸ’« Return value πŸ’«

It returns os. That's it. The stream comes back to you like a boomerang, bestie. πŸͺƒ


πŸ§ͺ Example πŸ§ͺ

This section is incomplete Reason: no example

Literally no example yet, which is a little tragic. 😭 The page is in its incomplete era.


πŸ’… Defect reports πŸ’…

The following behavior-changing defect reports were applied retroactively to previously published C++ standards. Retroactive glow-up, periodt.

  • P2372R3 β€” applied to C++20. Behavior as published: the given locale was used by default. Correct behavior: L is 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> (C++20) β€” formatting support for month (class template specialization)

πŸŽ€ Category πŸŽ€

  • Todo no example

That's the whole page, bestie β€” mwah πŸ’‹. Source/version/date: http://cppreference.com, 2024.06.10, and the footer title vibe is std::chrono...ekday_last)(3). 🫢✨

πŸ“¦ where this page comes from