Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      std::chrono::zoned_time<Duration,TimeZonePtr>::operator=

      From cppreference.com
      <cpp‎ |chrono‎ |zoned time
       
       
      Date and time library
       
       
      zoned_time& operator=(const zoned_time& other)=default;
      (1)(since C++20)
      zoned_time& operator=(conststd::chrono::sys_time<Duration>& other);
      (2)(since C++20)
      zoned_time& operator=(conststd::chrono::local_time<Duration>& other);
      (3)(since C++20)

      Assign the value ofother 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) Assignsother to the stored time point. The time zone pointer is unchanged. After this call,get_sys_time()== other.
      3) Convertsother to astd::chrono::sys_time as if byzone->to_sys(other) (wherezone 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 iftime_zone::to_sys() throws.
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/chrono/zoned_time/operator%3D&oldid=183373"

      [8]ページ先頭

      ©2009-2026 Movatter.jp