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

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

okay bestie, welcome to the std::chrono::operator<<(std::chrono::weekday_last) page from the C++ Standard Libary manual β€” the header is out here looking like std::chrono...ekday_last)(3), and that truncation is lowkey iconic πŸ’…βœ¨.

πŸ’… NAME πŸ’…

std::chrono::operator<<(std::chrono::weekday_last) β€” std::chrono::operator<<(std::chrono::weekday_last). Yes, it says it twice, and honestly? Say it twice so they know you mean it. The way that this is literally the stream-output overload for std::chrono::weekday_last, periodt.

πŸ¦‹ Synopsis πŸ¦‹

Defined in header <chrono>, and since C++20 it’s giving template-and-overload realness:

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::weekday_last& wdl );

What it does: it outputs a textual representation of wdl into the stream os, as if by:

os << std::format(os.getloc(), STATICALLY_WIDEN<CharT>("{:L}[last]"),
wdl.weekday());

where STATICALLY_WIDEN<CharT>("{:L}[last]") is "{:L}[last]" if CharT is char, and L"{:L}[last]" if CharT is wchar_t. That’s the whole format vibe check, no cap.

πŸŽ€ Return value πŸŽ€

os β€” that’s it, that’s the return value. It hands the stream right back to you, bestie 🫢.

🌸 Example 🌸

This section is incomplete. Reason: no example.

So there’s literally no example here, and we’re not gonna invent one πŸ™ˆ. The page is just out here incomplete, and that’s valid.

πŸ’€ Defect reports πŸ’€

okay so these are the behavior-changing defect reports that got 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: 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::weekday> (C++20) β€” formatting support for weekday (class template specialization)

πŸ“ Category πŸ“

  • Category: Todo no example

source/version: http://cppreference.com Β· date: 2024.06.10 Β· page tag: std::chrono...ekday_last)(3) β€” love u, bye bestie πŸ’–βœ¨

πŸ“¦ where this page comes from