std::chrono...::operator=(3)
π NAME π
Okay so this is the std::chrono...::operator=(3) page, bestie, and the main character is std::chrono::zoned_time::operator= β the assignment operator, fr fr. It assigns stuff, it slays, it has three whole overloads. π
β¨ Synopsis β¨
zoned_time& operator=( const zoned_time& other ) = default;
(1) (since C++20)
zoned_time& operator=( const std::chrono::sys_time<Duration>& other );
(2) (since C++20)
zoned_time& operator=( const std::chrono::local_time<Duration>& other );
(3) (since C++20)
Assign the value of other to *this. That's the whole vibe check. π«Ά
- Defaulted copy assignment operator. Copy-assigns both the stored time point and the stored time zone pointer.
zoned_timehas no move assignment operator; a move is a copy. Not me finding out a move is just a copy π - Assigns
otherto the stored time point. The time zone pointer is unchanged. After this call,get_sys_time() == other. Lowkey clean, no cap. - Converts
otherto astd::chrono::sys_timeas if byzone->to_sys(other)(wherezoneis the non-static data member holding the stored time zone pointer) and assigns the result to the stored time point. The time zone pointer is unchanged. After this call,get_local_time() == other. The way that conversion eats and leaves the time zone pointer alone β iconic. π
π«Ά Return value π«Ά
*this β that's it, that's the whole return value, periodt. π
mwah π source: http://cppreference.com Β· version/date: 2024.06.10 Β· page: std::chrono...::operator=(3) β no cap, that's the whole footer, bestie. π
π¦ 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