libstdc++: std::packaged_task< _Res(_ArgTypes...)> Class Template Reference

libstdc++

std::packaged_task< _Res(_ArgTypes...)> Class Template Reference
Concurrency » Futures

`#include <future>`

## Public Member Functions
template<typename _Fn, typename = __not_same<_Fn>>
| packaged_task (_Fn &&__fn)
| packaged_task (const packaged_task &)=delete
| packaged_task (packaged_task &&__other) noexcept
future< _Res > | get_future ()
void | make_ready_at_thread_exit (_ArgTypes... __args)
void | operator() (_ArgTypes... __args)
packaged_task & | operator= (const packaged_task &)=delete
packaged_task & | operator= (packaged_task &&__other) noexcept
void | reset ()
void | swap (packaged_task &__other) noexcept
bool | valid () const noexcept

## Detailed Description

template<typename _Res, typename... _ArgTypes>
class std::packaged_task< _Res(_ArgTypes...)>

packaged_task

Definition at line 1550 of file future.

## Constructor & Destructor Documentation

## ◆ packaged_task() [1/3]

template<typename _Res, typename... _ArgTypes>

std::packaged_task< _Res(_ArgTypes...)>::packaged_task | ( |  | ) |
| inlinenoexcept

Definition at line 1569 of file future.

## ◆ packaged_task() [2/3]

template<typename _Res, typename... _ArgTypes>
template<typename _Fn, typename = __not_same<_Fn>>

std::packaged_task< _Res(_ArgTypes...)>::packaged_task | ( | _Fn && | __fn | ) |
| inlineexplicit

Definition at line 1573 of file future.

## ◆ ~packaged_task()

template<typename _Res, typename... _ArgTypes>

std::packaged_task< _Res(_ArgTypes...)>::~packaged_task | ( |  | ) |
| inline

Definition at line 1604 of file future.

## ◆ packaged_task() [3/3]

template<typename _Res, typename... _ArgTypes>

std::packaged_task< _Res(_ArgTypes...)>::packaged_task | ( | packaged_task< _Res(_ArgTypes...)> && | __other | ) |
| inlinenoexcept

Definition at line 1615 of file future.

## Member Function Documentation

## ◆ get_future()

template<typename _Res, typename... _ArgTypes>

future< _Res > std::packaged_task< _Res(_ArgTypes...)>::get_future | ( |  | ) |
| inline

Definition at line 1634 of file future.

## ◆ make_ready_at_thread_exit()

template<typename _Res, typename... _ArgTypes>

void std::packaged_task< _Res(_ArgTypes...)>::make_ready_at_thread_exit | ( | _ArgTypes... | __args | ) |
| inline

Definition at line 1646 of file future.

## ◆ operator()()

template<typename _Res, typename... _ArgTypes>

void std::packaged_task< _Res(_ArgTypes...)>::operator() | ( | _ArgTypes... | __args | ) |
| inline

Definition at line 1639 of file future.

## ◆ operator=()

template<typename _Res, typename... _ArgTypes>

packaged_task & std::packaged_task< _Res(_ArgTypes...)>::operator= | ( | packaged_task< _Res(_ArgTypes...)> && | __other | ) |
| inlinenoexcept

Definition at line 1618 of file future.

## ◆ reset()

template<typename _Res, typename... _ArgTypes>

void std::packaged_task< _Res(_ArgTypes...)>::reset | ( |  | ) |
| inline

Definition at line 1653 of file future.

## ◆ swap()

template<typename _Res, typename... _ArgTypes>

void std::packaged_task< _Res(_ArgTypes...)>::swap | ( | packaged_task< _Res(_ArgTypes...)> & | __other | ) |
| inlinenoexcept

Definition at line 1625 of file future.

## ◆ valid()

template<typename _Res, typename... _ArgTypes>

bool std::packaged_task< _Res(_ArgTypes...)>::valid | ( |  | ) | const
| inlinenoexcept

Definition at line 1629 of file future.

The documentation for this class was generated from the following file:

- future