std::chrono...th_day_last)(3)

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

πŸ’… std::chrono::operator<<(std::chrono::year_month_day_last) πŸ’…

okay bestie, gather round 🫢. This page comes from the C++ Standard Libary (yes, that's the spelling in the header β€” not me, I would never πŸ’€). The header title is the abbreviated std::chrono...th_day_last)(3), and the actual star of the show is std::chrono::operator<<(std::chrono::year_month_day_last). slay.


✨ NAME ✨

The NAME section is literally std::chrono::operator<<(std::chrono::year_month_day_last) - std::chrono::operator<<(std::chrono::year_month_day_last). Yes, it repeats itself. main character energy.


🌸 Synopsis 🌸

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::year_month_day_last& ymdl );

It outputs a textual representation of ymdl into os, as if by:

os << std::format(os.getloc(), STATICALLY_WIDEN<CharT>("{}/{:L}"),
                  ymdl.year(), ymdl.month_day_last());

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


πŸ’– Return value πŸ’–

os. That's the whole return value. short, sweet, iconic.


πŸŽ€ Example πŸŽ€

This section is incomplete. Reason: no example.

Not me staring at an empty example section 😭. It's giving "trust me bestie" vibes.


πŸ”₯ 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: L is needed to use the given locale

periodt.


🌈 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 for year_month_day (class template specialization)

πŸ‘‘ Category πŸ‘‘

  • * Todo no example

Source/version: http://cppreference.com Β· date: 2024.06.10 Β· footer tag: std::chrono...th_day_last)(3). That's the whole page, bestie β€” go format something cute πŸ’–βœ¨

πŸ“¦ where this page comes from