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 1517 of file future.

## Constructor & Destructor Documentation

## packaged_task() [1/3]

template<typename _Res , typename... _ArgTypes>

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

inline noexcept

Definition at line 1530 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 | ) |

inline explicit

Definition at line 1534 of file future.

## ~packaged_task()

template<typename _Res , typename... _ArgTypes>

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

inline

Definition at line 1566 of file future.

## packaged_task() [3/3]

template<typename _Res , typename... _ArgTypes>

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

inline noexcept

Definition at line 1577 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 1596 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 1608 of file future.

## operator()()

template<typename _Res , typename... _ArgTypes>

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

inline

Definition at line 1601 of file future.

## operator=()

template<typename _Res , typename... _ArgTypes>

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

inline noexcept

Definition at line 1580 of file future.

## reset()

template<typename _Res , typename... _ArgTypes>

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

inline

Definition at line 1615 of file future.

## swap()

template<typename _Res , typename... _ArgTypes>

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

inline noexcept

Definition at line 1587 of file future.

## valid()

template<typename _Res , typename... _ArgTypes>

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

inline noexcept

Definition at line 1591 of file future.

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

- future