libstdc++: std::promise< _Res & > Class Template Reference

libstdc++

std::promise< _Res & > Class Template Reference
Concurrency » Futures

`#include <future>`

## Public Member Functions
template<typename _Allocator>
| promise (allocator_arg_t, const _Allocator &, promise &&__rhs)
template<typename _Allocator>
| promise (allocator_arg_t, const _Allocator &__a)
| promise (const promise &)=delete
| promise (promise &&__rhs) noexcept
future< _Res & > | get_future ()
promise & | operator= (const promise &)=delete
promise & | operator= (promise &&__rhs) noexcept
void | set_exception (exception_ptr __p)
void | set_exception_at_thread_exit (exception_ptr __p)
void | set_value (_Res &__r)
void | set_value_at_thread_exit (_Res &__r)
void | swap (promise &__rhs) noexcept

## Friends
template<typename, typename>
struct | _State::_Setter

## Detailed Description

template<typename _Res>
class std::promise< _Res & >

Partial specialization for promise<R&>.

Definition at line 1217 of file future.

## Constructor & Destructor Documentation

## ◆ promise() [1/4]

template<typename _Res>

std::promise< _Res & >::promise | ( |  | ) |
| inline

Definition at line 1229 of file future.

## ◆ promise() [2/4]

template<typename _Res>

std::promise< _Res & >::promise | ( | promise< _Res & > && | __rhs | ) |
| inlinenoexcept

Definition at line 1234 of file future.

## ◆ promise() [3/4]

template<typename _Res>
template<typename _Allocator>

std::promise< _Res & >::promise | ( | allocator_arg_t | ,
|  | const _Allocator & | __a )
| inline

Definition at line 1240 of file future.

## ◆ promise() [4/4]

template<typename _Res>
template<typename _Allocator>

std::promise< _Res & >::promise | ( | allocator_arg_t | ,
|  | const _Allocator & | ,
|  | promise< _Res & > && | __rhs )
| inline

Definition at line 1246 of file future.

## ◆ ~promise()

template<typename _Res>

std::promise< _Res & >::~promise | ( |  | ) |
| inline

Definition at line 1253 of file future.

## Member Function Documentation

## ◆ get_future()

template<typename _Res>

future< _Res & > std::promise< _Res & >::get_future | ( |  | ) |
| inline

Definition at line 1278 of file future.

## ◆ operator=()

template<typename _Res>

promise & std::promise< _Res & >::operator= | ( | promise< _Res & > && | __rhs | ) |
| inlinenoexcept

Definition at line 1261 of file future.

## ◆ set_exception()

template<typename _Res>

void std::promise< _Res & >::set_exception | ( | exception_ptr | __p | ) |
| inline

Definition at line 1287 of file future.

## ◆ set_exception_at_thread_exit()

template<typename _Res>

void std::promise< _Res & >::set_exception_at_thread_exit | ( | exception_ptr | __p | ) |
| inline

Definition at line 1298 of file future.

## ◆ set_value()

template<typename _Res>

void std::promise< _Res & >::set_value | ( | _Res & | __r | ) |
| inline

Definition at line 1283 of file future.

## ◆ set_value_at_thread_exit()

template<typename _Res>

void std::promise< _Res & >::set_value_at_thread_exit | ( | _Res & | __r | ) |
| inline

Definition at line 1291 of file future.

## ◆ swap()

template<typename _Res>

void std::promise< _Res & >::swap | ( | promise< _Res & > & | __rhs | ) |
| inlinenoexcept

Definition at line 1270 of file future.

## Friends And Related Symbol Documentation

## ◆ _State::_Setter

template<typename _Res>
template<typename, typename>

friend struct _State::_Setter
| friend

Definition at line 1222 of file future.

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

- future