Search:
Reference
<future>
packaged_task
swap
public member function
<future>
std::
packaged_task
::swap
void swap (packaged_task& x) noexcept;
Swap packaged_task
Exchanges the
shared state
and
stored task
with
x
.
Parameters
x
Another
packaged_task
object of the same type (with the same template parameters,
Ret
and
Args...
).
Return value
none
Data races
Both
x
and the object are modified.
Exception safety
No-throw guarantee:
never throws exceptions.
See also
packaged_task::operator=
Move-assign packaged_task
(public member function )
packaged_task::packaged_task
Construct packaged task
(public member function )
C++
Information
Tutorials
Reference
Articles
Forum
Reference
C library:
<cassert> (assert.h)
<cctype> (ctype.h)
<cerrno> (errno.h)
<cfenv> (fenv.h)
<cfloat> (float.h)
<cinttypes> (inttypes.h)
<ciso646> (iso646.h)
<climits> (limits.h)
<clocale> (locale.h)
<cmath> (math.h)
<csetjmp> (setjmp.h)
<csignal> (signal.h)
<cstdarg> (stdarg.h)
<cstdbool> (stdbool.h)
<cstddef> (stddef.h)
<cstdint> (stdint.h)
<cstdio> (stdio.h)
<cstdlib> (stdlib.h)
<cstring> (string.h)
<ctgmath> (tgmath.h)
<ctime> (time.h)
<cuchar> (uchar.h)
<cwchar> (wchar.h)
<cwctype> (wctype.h)
Containers:
<array>
<deque>
<forward_list>
<list>
<map>
<queue>
<set>
<stack>
<unordered_map>
<unordered_set>
<vector>
Input/Output:
<fstream>
<iomanip>
<ios>
<iosfwd>
<iostream>
<istream>
<ostream>
<sstream>
<streambuf>
Multi-threading:
<atomic>
<condition_variable>
<future>
<mutex>
<thread>
Other:
<algorithm>
<bitset>
<chrono>
<codecvt>
<complex>
<exception>
<functional>
<initializer_list>
<iterator>
<limits>
<locale>
<memory>
<new>
<numeric>
<random>
<ratio>
<regex>
<stdexcept>
<string>
<system_error>
<tuple>
<type_traits>
<typeindex>
<typeinfo>
<utility>
<valarray>
<future>
classes:
future
future_error
packaged_task
promise
shared_future
enum classes:
future_errc
future_status
launch
functions:
async
future_category
packaged_task
packaged_task::~packaged_task
packaged_task::packaged_task
member functions:
packaged_task::get_future
packaged_task::make_ready_at_thread_exit
packaged_task::operator()
packaged_task::operator=
packaged_task::reset
packaged_task::swap
packaged_task::valid
non-member overloads:
swap (packaged_task)
non-member specializations:
uses_allocator<packaged_task>