std::chrono...::file_time)(3)

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

🌸 NAME 🌸

okay so this page is std::chrono...::file_time)(3), from the C++ Standard Libary manual (yes, β€œLibary” β€” that’s literally the manual name, not me πŸ’€), and it’s all about std::chrono::operator<<(std::chrono::file_time). NAME says std::chrono::operator<<(std::chrono::file_time) β€” and then says std::chrono::operator<<(std::chrono::file_time) again. Self-referential queen behavior, honestly πŸ‘‘.

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

So this operator 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. Literally the whole vibe, bestie 🫢.

πŸ’– Return value πŸ’–

os. That’s the return value. That’s it. Slay ✨.

πŸ”₯ Defect reports πŸ”₯

The following behavior-changing defect reports were applied retroactively to previously published C++ standards.

  • 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::file_time> β€” formatting support for file_time (C++20) (class template specialization) πŸŽ€
  • format β€” stores formatted representation of the arguments in a new string (C++20) (function template) 🌈

source: http://cppreference.com Β· version/date: 2024.06.10 Β· page: std::chrono...::file_time)(3) β€” mwah, bestie πŸ’‹

πŸ“¦ where this page comes from