STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | Private Types | List of all members
function< _Fty > Class Template Reference
Inheritance diagram for function< _Fty >:

Public Types

typedef function< _Fty > _Myt
 

Public Member Functions

 function () _NOEXCEPT
 
 function (nullptr_t) _NOEXCEPT
 
 function (const _Myt &_Right)
 
template<class _Fx , class _Inv_res = typename _Mybase::template _Result_of_invoking_t<_Fx&>, class = typename _Mybase::template _Enable_if_returnable_t<_Inv_res>>
 function (_Fx _Func)
 
template<class _Alloc >
 function (allocator_arg_t, const _Alloc &) _NOEXCEPT
 
template<class _Alloc >
 function (allocator_arg_t, const _Alloc &, nullptr_t) _NOEXCEPT
 
template<class _Alloc >
 function (allocator_arg_t, const _Alloc &_Ax, const _Myt &_Right)
 
template<class _Fx , class _Alloc , class _Inv_res = typename _Mybase::template _Result_of_invoking_t<_Fx&>, class = typename _Mybase::template _Enable_if_returnable_t<_Inv_res>>
 function (allocator_arg_t, const _Alloc &_Ax, _Fx _Func)
 
 ~function () _NOEXCEPT
 
_Mytoperator= (const _Myt &_Right)
 
 function (_Myt &&_Right)
 
template<class _Alloc >
 function (allocator_arg_t, const _Alloc &_Al, _Myt &&_Right)
 
_Mytoperator= (_Myt &&_Right)
 
template<class _Fx , class _Inv_res = typename _Mybase::template _Result_of_invoking_t<decay_t<_Fx>&>, class = typename _Mybase::template _Enable_if_returnable_t<_Inv_res>>
_Mytoperator= (_Fx &&_Func)
 
_Mytoperator= (nullptr_t) _NOEXCEPT
 
template<class _Fx >
_Mytoperator= (reference_wrapper< _Fx > _Func) _NOEXCEPT
 
void swap (_Myt &_Right) _NOEXCEPT
 
 operator bool () const _NOEXCEPT
 
const _XSTD2 type_infotarget_type () const _NOEXCEPT
 
template<class _Fx >
_Fx * target () _NOEXCEPT
 
template<class _Fx >
const _Fx * target () const _NOEXCEPT
 

Private Types

typedef _Get_function_impl< _Fty >::type _Mybase
 

Member Typedef Documentation

template<class _Fty>
typedef _Get_function_impl<_Fty>::type function< _Fty >::_Mybase
private
template<class _Fty>
typedef function<_Fty> function< _Fty >::_Myt

Constructor & Destructor Documentation

template<class _Fty>
function< _Fty >::function ( )
inline
481  { // construct empty function wrapper
482  }
template<class _Fty>
function< _Fty >::function ( nullptr_t  )
inline
485  { // construct empty function wrapper from null pointer
486  }
template<class _Fty>
function< _Fty >::function ( const _Myt _Right)
inline
489  { // construct holding copy of _Right
490  this->_Reset_copy(_Right);
491  }
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Fty>
template<class _Fx , class _Inv_res = typename _Mybase::template _Result_of_invoking_t<_Fx&>, class = typename _Mybase::template _Enable_if_returnable_t<_Inv_res>>
function< _Fty >::function ( _Fx  _Func)
inline
497  { // construct wrapper holding copy of _Func
498  this->_Reset(_STD move(_Func));
499  }
constexpr remove_reference< _Ty >::type && move(_Ty &&_Arg) _NOEXCEPT
Definition: type_traits:1290
template<class _Fty>
template<class _Alloc >
function< _Fty >::function ( allocator_arg_t  ,
const _Alloc &   
)
inline
503  { // construct empty function wrapper, allocator
504  }
template<class _Fty>
template<class _Alloc >
function< _Fty >::function ( allocator_arg_t  ,
const _Alloc &  ,
nullptr_t   
)
inline
508  { // construct empty function wrapper from null pointer, allocator
509  }
template<class _Fty>
template<class _Alloc >
function< _Fty >::function ( allocator_arg_t  ,
const _Alloc &  _Ax,
const _Myt _Right 
)
inline
513  { // construct wrapper holding copy of _Right, allocator
514  this->_Reset_alloc(_Right, _Ax);
515  }
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Fty>
template<class _Fx , class _Alloc , class _Inv_res = typename _Mybase::template _Result_of_invoking_t<_Fx&>, class = typename _Mybase::template _Enable_if_returnable_t<_Inv_res>>
function< _Fty >::function ( allocator_arg_t  ,
const _Alloc &  _Ax,
_Fx  _Func 
)
inline
522  { // construct wrapper holding copy of _Func, allocator
523  this->_Reset_alloc(_STD move(_Func), _Ax);
524  }
constexpr remove_reference< _Ty >::type && move(_Ty &&_Arg) _NOEXCEPT
Definition: type_traits:1290
template<class _Fty>
function< _Fty >::~function ( )
inline
527  { // destroy the object
528  }
template<class _Fty>
function< _Fty >::function ( _Myt &&  _Right)
inline
537  { // construct holding moved copy of _Right
538  this->_Reset_move(_STD move(_Right));
539  }
constexpr remove_reference< _Ty >::type && move(_Ty &&_Arg) _NOEXCEPT
Definition: type_traits:1290
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Fty>
template<class _Alloc >
function< _Fty >::function ( allocator_arg_t  ,
const _Alloc &  _Al,
_Myt &&  _Right 
)
inline
543  { // construct wrapper holding moved copy of _Right, allocator
544  this->_Reset_alloc(_STD move(_Right), _Al);
545  }
constexpr remove_reference< _Ty >::type && move(_Ty &&_Arg) _NOEXCEPT
Definition: type_traits:1290
constexpr const _Ty &() _Right
Definition: algorithm:3591

Member Function Documentation

template<class _Fty>
function< _Fty >::operator bool ( ) const
inlineexplicit
595  { // test if wrapper holds function object
596  return (!this->_Empty());
597  }
template<class _Fty>
_Myt& function< _Fty >::operator= ( const _Myt _Right)
inline
531  { // assign _Right
532  _Myt(_Right).swap(*this);
533  return (*this);
534  }
function< _Fty > _Myt
Definition: functional:478
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Fty>
_Myt& function< _Fty >::operator= ( _Myt &&  _Right)
inline
548  { // assign by moving _Right
549  if (this != &_Right)
550  { // clean up and copy
551  this->_Tidy();
552  this->_Reset_move(_STD move(_Right));
553  }
554  return (*this);
555  }
constexpr remove_reference< _Ty >::type && move(_Ty &&_Arg) _NOEXCEPT
Definition: type_traits:1290
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Fty>
template<class _Fx , class _Inv_res = typename _Mybase::template _Result_of_invoking_t<decay_t<_Fx>&>, class = typename _Mybase::template _Enable_if_returnable_t<_Inv_res>>
_Myt& function< _Fty >::operator= ( _Fx &&  _Func)
inline
561  { // assign function object _Func
562  _Myt(_STD forward<_Fx>(_Func)).swap(*this);
563  return (*this);
564  }
function< _Fty > _Myt
Definition: functional:478
template<class _Fty>
_Myt& function< _Fty >::operator= ( nullptr_t  )
inline
576  { // clear function object
577  this->_Tidy();
578  return (*this);
579  }
template<class _Fty>
template<class _Fx >
_Myt& function< _Fty >::operator= ( reference_wrapper< _Fx >  _Func)
inline
583  { // assign wrapper holding reference_wrapper to function object
584  this->_Tidy();
585  this->_Reset(_Func);
586  return (*this);
587  }
template<class _Fty>
void function< _Fty >::swap ( _Myt _Right)
inline
590  { // swap with _Right
591  this->_Swap(_Right);
592  }
void _Swap(_Myt &_Right) _NOEXCEPT
Definition: functional:391
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Fty>
template<class _Fx >
_Fx* function< _Fty >::target ( )
inline
606  { // return pointer to target object
607  return (static_cast<_Fx *>(const_cast<void *>(
608  this->_Target(typeid(_Fx)))));
609  }
const void * _Target(const _XSTD2 type_info &_Info) const _NOEXCEPT
Definition: functional:413
template<class _Fty>
template<class _Fx >
const _Fx* function< _Fty >::target ( ) const
inline
613  { // return pointer to target object
614  return (static_cast<const _Fx *>(this->_Target(typeid(_Fx))));
615  }
const void * _Target(const _XSTD2 type_info &_Info) const _NOEXCEPT
Definition: functional:413
template<class _Fty>
const _XSTD2 type_info& function< _Fty >::target_type ( ) const
inline
600  { // return type_info object for target type
601  return (this->_Target_type());
602  }
const _XSTD2 type_info & _Target_type() const _NOEXCEPT
Definition: functional:408

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