libstdc++
Collaboration diagram for Futures:

Classes

class  std::__basic_future< _Res >
 
struct  std::__future_base
 
struct  std::__future_base::_Result< _Res >
 
struct  std::__future_base::_Result< _Res & >
 
struct  std::__future_base::_Result< void >
 
struct  std::__future_base::_Result_alloc< _Res, _Alloc >
 
struct  std::__future_base::_Result_base
 
class  std::future< _Res >
 
class  std::future< _Res & >
 
class  std::future< void >
 
class  std::future_error
 
struct  std::is_error_code_enum< future_errc >
 
class  std::packaged_task< _Res(_ArgTypes...)>
 
class  std::promise< _Res >
 
class  std::promise< _Res & >
 
class  std::promise< void >
 
class  std::shared_future< _Res >
 
class  std::shared_future< _Res & >
 
class  std::shared_future< void >
 

Typedefs

template<typename _Fn , typename... _Args>
using std::__async_result_of = typename __invoke_result< typename decay< _Fn >::type, typename decay< _Args >::type... >::type
 

Enumerations

enum class  std::future_errc { future_already_retrieved , promise_already_satisfied , no_state , broken_promise }
 
enum class  std::future_status { ready , timeout , deferred }
 
enum class  std::launch { async , deferred }
 

Functions

 std::__basic_future< _Res >::__basic_future (const shared_future< _Res > &) noexcept
 
 std::__basic_future< _Res >::__basic_future (future< _Res > &&) noexcept
 
 std::__basic_future< _Res >::__basic_future (shared_future< _Res > &&) noexcept
 
template<typename _Signature , typename _Fn , typename _Alloc = std::allocator<int>>
static shared_ptr< __future_base::_Task_state_base< _Signature > > std::__create_task_state (_Fn &&__fn, const _Alloc &__a=_Alloc())
 
template<typename _Fn , typename... _Args>
future< __async_result_of< _Fn, _Args... > > std::async (_Fn &&__fn, _Args &&... __args)
 
template<typename _Fn , typename... _Args>
future< __async_result_of< _Fn, _Args... > > std::async (launch __policy, _Fn &&__fn, _Args &&... __args)
 
const error_categorystd::future_category () noexcept
 
error_code std::make_error_code (future_errc __errc) noexcept
 
error_condition std::make_error_condition (future_errc __errc) noexcept
 
constexpr launch std::operator& (launch __x, launch __y) noexcept
 
launchstd::operator&= (launch &__x, launch __y) noexcept
 
constexpr launch std::operator^ (launch __x, launch __y) noexcept
 
launchstd::operator^= (launch &__x, launch __y) noexcept
 
constexpr launch std::operator| (launch __x, launch __y) noexcept
 
launchstd::operator|= (launch &__x, launch __y) noexcept
 
constexpr launch std::operator~ (launch __x) noexcept
 
shared_future< _Res > std::future< _Res >::share () noexcept
 
shared_future< _Res & > std::future< _Res & >::share () noexcept
 
shared_future< void > std::future< void >::share () noexcept
 
template<typename _Res , typename... _ArgTypes>
void std::swap (packaged_task< _Res(_ArgTypes...)> &__x, packaged_task< _Res(_ArgTypes...)> &__y) noexcept
 
template<typename _Res >
void std::swap (promise< _Res > &__x, promise< _Res > &__y) noexcept
 

Detailed Description

Classes for futures support.

Typedef Documentation

◆ __async_result_of

template<typename _Fn , typename... _Args>
using std::__async_result_of = typedef typename __invoke_result< typename decay<_Fn>::type, typename decay<_Args>::type...>::type

Definition at line 183 of file future.

Enumeration Type Documentation

◆ future_errc

enum class std::future_errc
strong

Error code for futures.

Definition at line 65 of file future.

◆ future_status

enum class std::future_status
strong

Status code for futures.

Definition at line 173 of file future.

◆ launch

enum class std::launch
strong

Launch code for futures.

Definition at line 136 of file future.

Function Documentation

◆ __basic_future() [1/3]

template<typename _Res >
std::__basic_future< _Res >::__basic_future ( const shared_future< _Res > &  __sf)
inlineexplicitprotectednoexcept

Definition at line 1024 of file future.

◆ __basic_future() [2/3]

template<typename _Res >
std::__basic_future< _Res >::__basic_future ( future< _Res > &&  __uf)
inlineexplicitprotectednoexcept

Definition at line 1036 of file future.

◆ __basic_future() [3/3]

template<typename _Res >
std::__basic_future< _Res >::__basic_future ( shared_future< _Res > &&  __sf)
inlineexplicitprotectednoexcept

Definition at line 1030 of file future.

◆ __create_task_state()

template<typename _Signature , typename _Fn , typename _Alloc = std::allocator<int>>
static shared_ptr< __future_base::_Task_state_base< _Signature > > std::__create_task_state ( _Fn &&  __fn,
const _Alloc &  __a = _Alloc() 
)
static

Definition at line 1500 of file future.

◆ async() [1/2]

template<typename _Fn , typename... _Args>
future< __async_result_of< _Fn, _Args... > > std::async ( _Fn &&  __fn,
_Args &&...  __args 
)
inline

async, potential overload

Definition at line 1802 of file future.

◆ async() [2/2]

template<typename _Fn , typename... _Args>
future< __async_result_of< _Fn, _Args... > > std::async ( launch  __policy,
_Fn &&  __fn,
_Args &&...  __args 
)

async

Definition at line 1768 of file future.

◆ future_category()

const error_category & std::future_category ( )
noexcept

Points to a statically-allocated object derived from error_category.

◆ make_error_code()

error_code std::make_error_code ( future_errc  __errc)
inlinenoexcept

Overload for make_error_code.

Definition at line 83 of file future.

◆ make_error_condition()

error_condition std::make_error_condition ( future_errc  __errc)
inlinenoexcept

Overload for make_error_condition.

Definition at line 88 of file future.

◆ operator&()

constexpr launch std::operator& ( launch  __x,
launch  __y 
)
constexprnoexcept

Definition at line 142 of file future.

◆ operator&=()

launch & std::operator&= ( launch __x,
launch  __y 
)
inlinenoexcept

Definition at line 163 of file future.

◆ operator^()

constexpr launch std::operator^ ( launch  __x,
launch  __y 
)
constexprnoexcept

Definition at line 154 of file future.

◆ operator^=()

launch & std::operator^= ( launch __x,
launch  __y 
)
inlinenoexcept

Definition at line 169 of file future.

◆ operator|()

constexpr launch std::operator| ( launch  __x,
launch  __y 
)
constexprnoexcept

Definition at line 148 of file future.

◆ operator|=()

launch & std::operator|= ( launch __x,
launch  __y 
)
inlinenoexcept

Definition at line 166 of file future.

◆ operator~()

constexpr launch std::operator~ ( launch  __x)
constexprnoexcept

Definition at line 160 of file future.

◆ share() [1/3]

template<typename _Res >
shared_future< _Res > std::future< _Res >::share
inlinenoexcept

Definition at line 1045 of file future.

◆ share() [2/3]

template<typename _Res >
shared_future< _Res & > std::future< _Res & >::share
inlinenoexcept

Definition at line 1050 of file future.

◆ share() [3/3]

shared_future< void > std::future< void >::share ( )
inlinenoexcept

Definition at line 1054 of file future.

◆ swap() [1/2]

template<typename _Res , typename... _ArgTypes>
void std::swap ( packaged_task< _Res(_ArgTypes...)> &  __x,
packaged_task< _Res(_ArgTypes...)> &  __y 
)
inlinenoexcept

swap

Definition at line 1638 of file future.

◆ swap() [2/2]

template<typename _Res >
void std::swap ( promise< _Res > &  __x,
promise< _Res > &  __y 
)
inlinenoexcept

Definition at line 1175 of file future.