libstdc++: std::future< void > Class Reference

libstdc++

std::future< void > Class Reference
Concurrency » Futures

`#include <future>`

Inheritance diagram for std::future< void >:
[legend]

## Public Member Functions
| future (const future &)=delete
| future (future &&__uf) noexcept
void | get ()
future & | operator= (const future &)=delete
future & | operator= (future &&__fut) noexcept
shared_future< void > | share () noexcept
bool | valid () const noexcept
void | wait () const
future_status | wait_for (const chrono::duration< _Rep, _Period > &__rel) const
future_status | wait_until (const chrono::time_point< _Clock, _Duration > &__abs) const

## Protected Types
typedef __future_base::_Result< void > & | __result_type

## Protected Member Functions
__result_type | _M_get_result () const
void | _M_swap (__basic_future &__that) noexcept

## Friends
template<typename _Fn, typename... _Args>
future< __async_result_of< _Fn, _Args... > > | async (launch, _Fn &&, _Args &&...)
template<typename>
class | packaged_task
class | promise< _Res >
class | promise< void >

## Detailed Description

Explicit specialization for future<void>.

Definition at line 887 of file future.

## Member Typedef Documentation

## ◆ __result_type

typedef __future_base::_Result<void>& std::__basic_future< void >::__result_type
| protected

Definition at line 708 of file future.

## Constructor & Destructor Documentation

## ◆ future() [1/2]

std::future< void >::future | ( |  | ) |
| inlineconstexprnoexcept

Definition at line 902 of file future.

## ◆ future() [2/2]

std::future< void >::future | ( | future< void > && | __uf | ) |
| inlinenoexcept

Move constructor.

Definition at line 905 of file future.

References std::move().

## Member Function Documentation

## ◆ _M_get_result()

__result_type std::__basic_future< void >::_M_get_result | ( |  | ) | const
| inlineprotected

Wait for the state to be ready and rethrow any stored exception.

Definition at line 747 of file future.

Referenced by get().

## ◆ _M_swap()

void std::__basic_future< void >::_M_swap | ( | __basic_future< void > & | __that | ) |
| inlineprotectednoexcept

Definition at line 756 of file future.

## ◆ get()

void std::future< void >::get | ( |  | ) |
| inline

Retrieving the value.

Definition at line 919 of file future.

References _M_get_result().

## ◆ operator=()

future & std::future< void >::operator= | ( | future< void > && | __fut | ) |
| inlinenoexcept

Definition at line 911 of file future.

## ◆ valid()

bool std::__basic_future< void >::valid | ( |  | ) | const
| inlinenoexcept

Definition at line 719 of file future.

## ◆ wait()

void std::__basic_future< void >::wait | ( |  | ) | const
| inline

Definition at line 722 of file future.

## ◆ wait_for()

future_status std::__basic_future< void >::wait_for | ( | const chrono::duration< _Rep, _Period > & | __rel | ) | const
| inline

Definition at line 730 of file future.

## ◆ wait_until()

future_status std::__basic_future< void >::wait_until | ( | const chrono::time_point< _Clock, _Duration > & | __abs | ) | const
| inline

Definition at line 738 of file future.

## Friends And Related Symbol Documentation

## ◆ packaged_task

template<typename>

friend class packaged_task
| friend

Definition at line 890 of file future.

## ◆ promise< _Res >

friend class promise< void >
| friend

Definition at line 800 of file future.

## ◆ promise< void >

friend class promise< void >
| friend

Definition at line 882 of file future.

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

- future