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)
template<typename _Fn , typename _Alloc , typename = __not_same<_Fn>>
| packaged_task (allocator_arg_t, const _Alloc &__a, _Fn &&__fn)
template<typename _Allocator >
| packaged_task (allocator_arg_t, const _Allocator &, const packaged_task &)=delete
template<typename _Allocator >
| packaged_task (allocator_arg_t, const _Allocator &, packaged_task &&__other) noexcept
template<typename _Allocator >
| packaged_task (allocator_arg_t, const _Allocator &__a) noexcept
| 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 1467 of file future.

## Constructor & Destructor Documentation

## packaged_task() [1/6]

template<typename _Res , typename... _ArgTypes>

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

inline noexcept

Definition at line 1480 of file future.

## packaged_task() [2/6]

template<typename _Res , typename... _ArgTypes>
template<typename _Allocator >

std::packaged_task< _Res(_ArgTypes...)>::packaged_task | ( | allocator_arg_t | ,
|  | const _Allocator & | __a
| ) |  |

inline noexcept

Definition at line 1485 of file future.

## packaged_task() [3/6]

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

## packaged_task() [4/6]

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

std::packaged_task< _Res(_ArgTypes...)>::packaged_task | ( | allocator_arg_t | ,
|  | const _Alloc & | __a,
|  | _Fn && | __fn
| ) |  |

inline

Definition at line 1499 of file future.

## ~packaged_task()

template<typename _Res , typename... _ArgTypes>

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

inline

Definition at line 1504 of file future.

## packaged_task() [5/6]

template<typename _Res , typename... _ArgTypes>

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

inline noexcept

Definition at line 1519 of file future.

## packaged_task() [6/6]

template<typename _Res , typename... _ArgTypes>
template<typename _Allocator >

std::packaged_task< _Res(_ArgTypes...)>::packaged_task | ( | allocator_arg_t | ,
|  | const _Allocator & | ,
|  | packaged_task< _Res(_ArgTypes...)> && | __other
| ) |  |

inline noexcept

Definition at line 1523 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 1543 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 1555 of file future.

## operator()()

template<typename _Res , typename... _ArgTypes>

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

inline

Definition at line 1548 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 1527 of file future.

## reset()

template<typename _Res , typename... _ArgTypes>

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

inline

Definition at line 1562 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 1534 of file future.

## valid()

template<typename _Res , typename... _ArgTypes>

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

inline noexcept

Definition at line 1538 of file future.

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

- future