std::chrono::zoned_time<Duration,TimeZonePtr>::operator=
From cppreference.com
< cpp | chrono | zoned time
C++
Feature test macros (C++20)
Concepts library (C++20)
Metaprogramming library (C++11)
Ranges library (C++20)
Filesystem library (C++17)
Concurrency support library (C++11)
Execution control library (C++26)
Date and time library
(C++11)
(C++20)
(C++20)
(C++11)
(C++11)
(C++11)
(C++20)
(C++20)
(C++20)
(C++11)
(C++20)
(C++20)
(C++20)
(C++20)(C++20)
(C++20)(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)(C++20)
(C++20)
(C++20)
(C++20)
(C++20)(C++20)(C++20)(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
(C++20)
std::chrono::zoned_time
Member functions
zoned_time::operator=
Nonmember functions
Helper classes
(C++26)
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.
1) Defaulted copy assignment operator. Copy-assigns both the stored time point and the stored time zone pointer.
zoned_time
has no move assignment operator; a move is a copy.2) Assigns other to the stored time point. The time zone pointer is unchanged. After this call, get_sys_time() == other.
3) Converts other to a std::chrono::sys_time as if by zone->to_sys(other) (where
zone
is 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.[edit] Return value
*this
[edit] Exceptions
3) Throws if time_zone::to_sys() throws.