std::chrono...::tai_time)(3)

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

πŸŽ€ NAME πŸŽ€

NAME: std::chrono::operator<<(std::chrono::tai_time) - std::chrono::operator<<(std::chrono::tai_time)

Okay so bestie, this page lives in the C++ Standard Libary manual β€” yes, the header says std::chrono...::tai_time)(3), and we’re keeping that energy. This is the operator<< page for std::chrono::tai_time, and it’s giving very specific chrono stream-output vibes. πŸ’…βœ¨


✨ Synopsis ✨

Defined in header <chrono>:

template< class CharT, class Traits, class Duration >

std::basic_ostream<CharT, Traits>&                            (since C++20)
    operator<<( std::basic_ostream<CharT, Traits>& os,

                const std::chrono::tai_time<Duration>& tp );

So what’s the tea? It outputs tp into the stream os, as if by os << std::format(os.getloc(), STATICALLY-WIDEN("{:L%F %T}"), tp), where STATICALLY_WIDEN<CharT>("{:L%F %T}") is "{:L%F %T}" if CharT is char, and L"{:L%F %T}" if CharT is wchar_t. No cap, that’s the whole formatting moment. πŸ¦‹


πŸ’– Return value πŸ’–

os β€” that’s it, that’s the return value. Iconic. 🫢


🫢 Defect reports 🫢

The following behavior-changing defect reports were applied retroactively to previously published C++ standards. Yes, retroactively β€” the lore got patched. 🧚

  • DR P2372R3, applied to C++20: behavior as published was β€œthe given locale was used by default”; correct behavior is β€œL is needed to use the given locale”.

πŸ‘€ See also πŸ‘€

  • std::formatter<std::chrono::tai_time> (C++20) β€” formatting support for tai_time (class template specialization)
  • format (C++20) β€” stores formatted representation of the arguments in a new string (function template)

xoxo, your chrono bestie πŸ’– β€” source http://cppreference.com, version/date 2024.06.10, footer title std::chrono...::tai_time)(3). periodt. πŸŽ€

πŸ“¦ where this page comes from