std::chrono...::gps_time)(3)

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

πŸŽ€ NAME πŸŽ€

std::chrono::operator<<(std::chrono::gps_time) β€” std::chrono::operator<<(std::chrono::gps_time)

Okay so this is the std::chrono...::gps_time)(3) page from the C++ Standard Libary manual, and it's literally the group-chat explainer for streaming a gps_time. πŸ’…βœ¨


✨ Synopsis ✨

Defined in header <chrono> β€” yes bestie, that exact header:

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::gps_time<Duration>& tp );

This overload 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. 🫢


🌈 Return value 🌈

It returns os. That's it, that's the whole vibe. 😌


πŸ’€ 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.

πŸ¦‹ See also πŸ¦‹

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

Byeee bestie 🫢 this iconic page is from http://cppreference.com, dated 2024.06.10, and its title is std::chrono...::gps_time)(3). Mwah πŸ’‹πŸŽ€

πŸ“¦ where this page comes from