Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      std::shared_future<T>::shared_future

      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
       
       
      shared_future()noexcept;
      (1)(since C++11)
      (2)
      shared_future(const shared_future& other);
      (since C++11)
      (until C++17)
      shared_future(const shared_future& other)noexcept;
      (since C++17)
      shared_future(std::future<T>&& other)noexcept;
      (3)(since C++11)
      shared_future( shared_future&& other)noexcept;
      (4)(since C++11)

      Constructs a newshared_future.

      1) Default constructor. Constructs an empty shared future, that doesn't refer to a shared state, that isvalid()==false.
      2) Constructs a shared future that refers to the same shared state, if any, asother.
      3,4) Transfers the shared state held byother to*this. After the construction,other.valid()==false, andthis->valid() returns the same value asother.valid() would have returned before the construction.

      [edit]Parameters

      other - another future object to initialize with
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/thread/shared_future/shared_future&oldid=161222"

      [8]ページ先頭

      ©2009-2025 Movatter.jp