std::experimental::make_ready_future
From cppreference.com
< cpp | experimental
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)
Experimental
Filesystem library (filesystem TS)
Library fundamentals (library fundamentals TS)
Library fundamentals 2 (library fundamentals TS v2)
Library fundamentals 3 (library fundamentals TS v3)
Extensions for parallelism (parallelism TS)
Extensions for parallelism 2 (parallelism TS v2)
Extensions for concurrency (concurrency TS)
Extensions for concurrency 2 (concurrency TS v2)
Concepts (concepts TS)
Ranges (ranges TS)
Reflection (reflection TS)
Mathematical special functions (special functions TR)
Extensions for concurrency
std::future extensions
experimental::make_ready_future
Latches and barriers
Atomic smart pointers
Defined in header
<experimental/future>
template< class T >
future<V /* see below */> make_ready_future( T&& value );
(1)
(concurrency TS)
future<V /* see below */> make_ready_future( T&& value );
future<void> make_ready_future();
(2)
(concurrency TS)
1) If std::decay_t <T> is std::reference_wrapper <X>, then the type
V
is X&
, otherwise, V
is std::decay_t <T>. Creates a shared state of type
V
that is immediately ready, with the result constructed from std::forward <T>(value), then returns a std::experimental::future associated with that shared state.2) Creates a shared state of type void that is immediately ready, then returns a std::experimental::future associated with that shared state.
[edit] Return value
A std::experimental::future
associated with the shared state that is created.
[edit] See also
(concurrency TS)
(function template) [edit]