std::chrono...local_time)(3)

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

std::chrono...local_time)(3) πŸ’…

okay bestie, welcome to the C++ Standard Libary manual page β€” yes, that's the manual name, and we are respecting it ✨


🌸 NAME 🌸

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

That's the whole name, periodt. πŸ’–


🌈 Synopsis 🌈

Here's the signature, bestie β€” copy it exactly, no autocorrect 😭

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

So since C++20, this operator outputs tp into the stream os, as if by os << std::chrono::sys_time<Duration>(tp.time_since_epoch());. That's the vibe, no cap. πŸ¦‹


πŸ’– Return value πŸ’–

os

That's it. It returns the stream. Iconic, lowkey perfect, no notes. 🫢


πŸ¦‹ See also πŸ¦‹

  • operator<<(std::chrono::sys_time) β€” performs stream output on a sys_time (C++20) (function template). iykyk πŸ‘‘

xoxo, your Unix bestie signing off πŸŽ€ β€” source: http://cppreference.com, version/date: 2024.06.10, page header fr fr: std::chrono...local_time)(3) πŸ’œ

πŸ“¦ where this page comes from