std::chrono...::hh_mm_ss)(3)
π NAME π
okay bestie, this is the C++ Standard Libary manual, section (3), page for std::chrono::operator<<(std::chrono::hh_mm_ss) π«Ά
std::chrono::operator<<(std::chrono::hh_mm_ss)βstd::chrono::operator<<(std::chrono::hh_mm_ss).
β¨ Synopsis β¨
Hiii so this one is defined in header <chrono> and itβs since C++20 β¨:
template< class CharT, class Traits, class Duration >
std::basic_ostream<CharT, Traits>&
operator<<( std::basic_ostream<CharT, Traits>& os,
const std::chrono::hh_mm_ss<Duration>& t );
It outputs t into the stream os, fr fr π
.
Equivalent to:
return os << std::format(os.getloc(), STATICALLY_WIDEN<CharT>("{:L%T}"), hms);
where STATICALLY_WIDEN<CharT>("{:L%T}") is "{:L%T}" if CharT is char, and L"{:L%T}" if CharT is wchar_t π
π Parameters π
osβ the output stream, bestie.tβ the time of day to be output.
π«Ά Return value π«Ά
Returns os. Thatβs it, thatβs the return value π«Ά
π Example π
This section is incomplete. Reason: no example.
π₯ 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:Lis needed to use the given locale.
π¦ See also π¦
format(C++20) β function template; stores formatted representation of the arguments in a new string.std::formatter<std::chrono::hh_mm_ss>(C++20) β class template specialization; formatting support forhh_mm_ss.
π Category π
- Todo no example
shoutout to http://cppreference.com and the date 2024.06.10 β thatβs the source/version and date, bestie, mwah π
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms