STLdoc
STLdocumentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Private Attributes | List of all members
promise< _Ty & > Class Template Reference

Public Member Functions

 promise ()
 
template<class _Alloc >
 promise (allocator_arg_t, const _Alloc &_Al)
 
 promise (promise &&_Other) _NOEXCEPT
 
promiseoperator= (promise &&_Other) _NOEXCEPT
 
 ~promise () _NOEXCEPT
 
void swap (promise &_Other) _NOEXCEPT
 
future< _Ty & > get_future ()
 
void set_value (_Ty &_Val)
 
void set_value_at_thread_exit (_Ty &_Val)
 
void set_exception (exception_ptr _Exc)
 
void set_exception_at_thread_exit (exception_ptr _Exc)
 
 promise (const promise &)=delete
 
promiseoperator= (const promise &)=delete
 

Private Attributes

_Promise< _Ty * > _MyPromise
 

Constructor & Destructor Documentation

template<class _Ty >
promise< _Ty & >::promise ( )
inline
1574  { // construct
1575  }
_Promise< _Ty * > _MyPromise
Definition: future:1639
template<class _Ty >
template<class _Alloc >
promise< _Ty & >::promise ( allocator_arg_t  ,
const _Alloc &  _Al 
)
inline
1579  : _MyPromise(_Make_associated_state<_Ty *>(_Al))
1580  { // construct with allocator
1581  }
_Promise< _Ty * > _MyPromise
Definition: future:1639
template<class _Ty >
promise< _Ty & >::promise ( promise< _Ty & > &&  _Other)
inline
1585  { // construct from rvalue promise object
1586  }
_Promise< _Ty * > _MyPromise
Definition: future:1639
_Promise< _Ty > _MyPromise
Definition: future:1565
constexpr _Ty && forward(typename remove_reference< _Ty >::type &_Arg) _NOEXCEPT
Definition: type_traits:1332
template<class _Ty >
promise< _Ty & >::~promise ( )
inline
1595  { // destroy
1597  { // exception if destroyed before function object returns
1600  ._Set_exception(_STD make_exception_ptr(_Fut), false);
1601  }
1602  }
bool _Is_valid() const _NOEXCEPT
Definition: future:1458
_Promise< _Ty * > _MyPromise
Definition: future:1639
error_code make_error_code(_Future_errc _Errno) _NOEXCEPT
Definition: future:119
void _Set_exception(exception_ptr _Exc, bool _Defer)
Definition: future:1035
bool _Is_ready() const
Definition: future:1463
Definition: future:151
exception_ptr make_exception_ptr(_Ex _Except) _NOEXCEPT
Definition: exception:378
bool _Is_ready_at_thread_exit() const
Definition: future:1468
const _State_manager< _Ty > & _Get_state() const
Definition: future:1427
template<class _Ty >
promise< _Ty & >::promise ( const promise< _Ty & > &  )
delete

Member Function Documentation

template<class _Ty >
future<_Ty&> promise< _Ty & >::get_future ( )
inline
1610  { // return a future object that shares the associated
1611  // asynchronous state
1613  }
_Promise< _Ty * > _MyPromise
Definition: future:1639
Definition: future:1148
Definition: xtr1common:16
_State_manager< _Ty > & _Get_state_for_future()
Definition: future:1445
template<class _Ty >
promise& promise< _Ty & >::operator= ( promise< _Ty & > &&  _Other)
inline
1589  { // assign from rvalue promise object
1590  promise(_STD move(_Other)).swap(*this);
1591  return (*this);
1592  }
promise()
Definition: future:1572
constexpr remove_reference< _Ty >::type && move(_Ty &&_Arg) _NOEXCEPT
Definition: type_traits:1349
template<class _Ty >
promise& promise< _Ty & >::operator= ( const promise< _Ty & > &  )
delete
template<class _Ty >
void promise< _Ty & >::set_exception ( exception_ptr  _Exc)
inline
1626  { // store result
1628  }
_State_manager< _Ty > & _Get_state_for_set()
Definition: future:1436
_Promise< _Ty * > _MyPromise
Definition: future:1639
void _Set_exception(exception_ptr _Exc, bool _Defer)
Definition: future:1035
template<class _Ty >
void promise< _Ty & >::set_exception_at_thread_exit ( exception_ptr  _Exc)
inline
1631  { // store result and block until thread exit
1633  }
_State_manager< _Ty > & _Get_state_for_set()
Definition: future:1436
_Promise< _Ty * > _MyPromise
Definition: future:1639
void _Set_exception(exception_ptr _Exc, bool _Defer)
Definition: future:1035
template<class _Ty >
void promise< _Ty & >::set_value ( _Ty &  _Val)
inline
1616  { // store result
1618  }
_State_manager< _Ty > & _Get_state_for_set()
Definition: future:1436
_Promise< _Ty * > _MyPromise
Definition: future:1639
void _Set_value(const _Ty &_Val, bool _Defer)
Definition: future:1013
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _Ty >
void promise< _Ty & >::set_value_at_thread_exit ( _Ty &  _Val)
inline
1621  { // store result and block until thread exit
1623  }
_State_manager< _Ty > & _Get_state_for_set()
Definition: future:1436
_Promise< _Ty * > _MyPromise
Definition: future:1639
void _Set_value(const _Ty &_Val, bool _Defer)
Definition: future:1013
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _Ty >
void promise< _Ty & >::swap ( promise< _Ty & > &  _Other)
inline
1605  { // exchange with _Other
1606  _MyPromise._Swap(_Other._MyPromise);
1607  }
_Promise< _Ty * > _MyPromise
Definition: future:1639
void _Swap(_Promise &_Other)
Definition: future:1421
_Promise< _Ty > _MyPromise
Definition: future:1565

Member Data Documentation

template<class _Ty >
_Promise<_Ty *> promise< _Ty & >::_MyPromise
private

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