Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      std::shared_future<T>::operator=

      From cppreference.com
      <cpp‎ |thread‎ |shared future
       
       
      Concurrency support library
      Threads
      (C++11)
      (C++20)
      this_thread namespace
      (C++11)
      (C++11)
      (C++11)
      Cooperative cancellation
      Mutual exclusion
      Generic lock management
      (C++11)
      (C++11)
      (C++11)
      (C++11)
      Condition variables
      (C++11)
      Semaphores
      Latches and Barriers
      (C++20)
      (C++20)
      Futures
      (C++11)
      (C++11)
      (C++11)
      Safe reclamation
      Hazard pointers
      Atomic types
      (C++11)
      (C++20)
      Initialization of atomic types
      (C++11)(deprecated in C++20)
      (C++11)(deprecated in C++20)
      Memory ordering
      (C++11)(deprecated in C++26)
      Free functions for atomic operations
      Free functions for atomic flags
       
       
      (1)
      shared_future& operator=(const shared_future& other);
      (since C++11)
      (until C++17)
      shared_future& operator=(const shared_future& other)noexcept;
      (since C++17)
      shared_future& operator=( shared_future&& other)noexcept;
      (2)(since C++11)

      Assigns the contents of anothershared_future.

      1) Releases any shared state and assigns the contents ofother to*this. After the assignment,this->valid()== other.valid().
      2) Releases any shared state and move-assigns the contents ofother to*this. After the assignment,other.valid()==false andthis->valid() will yield the same value asother.valid() before the assignment.

      [edit]Parameters

      other - astd::shared_future that will transfer state to*this

      [edit]Return value

      *this

      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/thread/shared_future/operator%3D&oldid=161221"

      [8]ページ先頭

      ©2009-2025 Movatter.jp