STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Classes | Namespaces | Macros | Enumerations | Functions | Variables
functional File Reference
#include <xfunctional>
#include <exception>
#include <typeinfo>
#include <tuple>

Classes

class  _Mem_fn< _Memptr >
 
class  bad_function_call
 
class  function< _Fty >
 
class  _Func_base< _Rx, _Types >
 
union  _Storage
 
struct  _Get_function_impl< _Tx >
 
class  function< _Fty >
 
struct  _Ph< _Nx >
 
struct  is_placeholder< _Tx >
 
struct  is_placeholder< _Ph< _Nx > >
 
struct  is_placeholder< const _Tx >
 
struct  is_placeholder< volatile _Tx >
 
struct  is_placeholder< const volatile _Tx >
 
class  _Binder< _Ret, _Fx, _Types >
 
struct  is_bind_expression< _Tx >
 
struct  is_bind_expression< _Binder< _Ret, _Fx, _Types...> >
 
struct  is_bind_expression< const _Tx >
 
struct  is_bind_expression< volatile _Tx >
 
struct  is_bind_expression< const volatile _Tx >
 
struct  _Select_fixer< _Cv_TiD, bool, bool, int >
 
struct  _Select_fixer< _Cv_TiD, true, false, 0 >
 
struct  _Select_fixer< _Cv_TiD, false, true, 0 >
 
struct  _Select_fixer< _Cv_TiD, false, false, 0 >
 
struct  _Select_fixer< _Cv_TiD, false, false, _Jx >
 
struct  _Forced_result_type< _Ret >
 
struct  _Binder_result_type< _Ret, _Fx >
 
class  _Binder< _Ret, _Fx, _Types >
 
struct  std::uses_allocator< function< _Fty >, _Alloc >
 

Namespaces

 placeholders
 

Macros

#define _FUNCTIONAL_
 
#define _GET_FUNCTION_IMPL(CALL_OPT, X1, X2)
 
#define _BINDER_OPERATOR(CONST_OPT)
 

Enumerations

enum  { _EEN_IMPL = _Small_object_num_ptrs - 1 }
 

Functions

template<class _Rx , class _Ty >
_Mem_fn< _Rx _Ty::* > mem_fn (_Rx _Ty::*_Pm) _NOEXCEPT
 
_CRTIMP2_PURE void __CLRCALL_PURE_OR_CDECL _Xbad_function_call ()
 
template<class _Ty >
bool _Test_callable (const _Ty &_Arg, true_type) _NOEXCEPT
 
template<class _Ty >
bool _Test_callable (const _Ty &, false_type) _NOEXCEPT
 
template<class _Ty >
bool _Test_callable (const _Ty &_Arg) _NOEXCEPT
 
template<class _Fty >
bool _Test_callable (const function< _Fty > &_Arg) _NOEXCEPT
 
template<class _Impl >
 _Set (0)
 
void _Swap (_Myt &_Right) _NOEXCEPT
 
const type_info_Target_type () const _NOEXCEPT
 
const void_Target (const type_info &_Info) const _NOEXCEPT
 
bool _Local () const _NOEXCEPT
 
_Ptrt * _Getimpl () const _NOEXCEPT
 
void _Set (_Ptrt *_Ptr) _NOEXCEPT
 
void_Getspace () _NOEXCEPT
 
template<class _Fty >
void swap (function< _Fty > &_Left, function< _Fty > &_Right) _NOEXCEPT
 
template<class _Fty >
bool operator== (const function< _Fty > &_Other, nullptr_t) _NOEXCEPT
 
template<class _Fty >
bool operator== (nullptr_t, const function< _Fty > &_Other) _NOEXCEPT
 
template<class _Fty >
bool operator!= (const function< _Fty > &_Other, nullptr_t) _NOEXCEPT
 
template<class _Fty >
bool operator!= (nullptr_t, const function< _Fty > &_Other) _NOEXCEPT
 
template<class _Cv_TiD , class _Untuple >
auto _Fix_arg (_Cv_TiD &_Tid, _Untuple &&_Ut) -> decltype(_Select_fixer< _Cv_TiD >::_Fix(_Tid, _STD move(_Ut)))
 
template<class _Ret , size_t... _Ix, class _Cv_FD , class _Cv_tuple_TiD , class _Untuple >
auto _Call_binder (_Invoker_ret< _Ret >, index_sequence< _Ix...>, _Cv_FD &_Obj, _Cv_tuple_TiD &_Tpl, _Untuple &&_Ut) -> decltype(_Invoker_ret< _Ret >::_Call(_Obj, _Fix_arg(_STD get< _Ix >(_Tpl), _STD move(_Ut))...))
 
template<class _Fx , class... _Types>
_Binder< _Unforced, _Fx, _Types...> bind (_Fx &&_Func, _Types &&..._Args)
 
template<class _Ret , class _Fx , class... _Types>
_Binder< _Ret, _Fx, _Types...> bind (_Fx &&_Func, _Types &&..._Args)
 

Variables

constexpr size_t _Space_size = (_Small_object_num_ptrs - 1) * sizeof (void *)
 
_Storage _Mystorage
 
template<class _Ty >
constexpr int is_placeholder_v = is_placeholder<_Ty>::value
 
template<class _Ty >
constexpr bool is_bind_expression_v = is_bind_expression<_Ty>::value
 
constexpr _Ph< 1 > placeholders::_1
 
constexpr _Ph< 2 > placeholders::_2 {}
 
constexpr _Ph< 3 > placeholders::_3 {}
 
constexpr _Ph< 4 > placeholders::_4 {}
 
constexpr _Ph< 5 > placeholders::_5 {}
 
constexpr _Ph< 6 > placeholders::_6 {}
 
constexpr _Ph< 7 > placeholders::_7 {}
 
constexpr _Ph< 8 > placeholders::_8 {}
 
constexpr _Ph< 9 > placeholders::_9 {}
 
constexpr _Ph< 10 > placeholders::_10 {}
 
constexpr _Ph< 11 > placeholders::_11 {}
 
constexpr _Ph< 12 > placeholders::_12 {}
 
constexpr _Ph< 13 > placeholders::_13 {}
 
constexpr _Ph< 14 > placeholders::_14 {}
 
constexpr _Ph< 15 > placeholders::_15 {}
 
constexpr _Ph< 16 > placeholders::_16 {}
 
constexpr _Ph< 17 > placeholders::_17 {}
 
constexpr _Ph< 18 > placeholders::_18 {}
 
constexpr _Ph< 19 > placeholders::_19 {}
 
constexpr _Ph< 20 > placeholders::_20 {}
 

Macro Definition Documentation

#define _BINDER_OPERATOR (   CONST_OPT)
Value:
template<class... _Unbound> \
auto operator()(_Unbound&&... _Unbargs) CONST_OPT \
-> decltype(_Call_binder(_Invoker_ret<_Ret>(), _Seq(), \
_Mypair._Get_first(), _Mypair._Get_second(), \
_STD forward_as_tuple(_STD forward<_Unbound>(_Unbargs)...))) \
{ /* invoke bound callable object with bound/unbound arguments */ \
_Mypair._Get_first(), _Mypair._Get_second(), \
_STD forward_as_tuple(_STD forward<_Unbound>(_Unbargs)...))); \
}
return
Definition: corecrt_memcpy_s.h:60
constexpr tuple< _Types &&...> forward_as_tuple(_Types &&..._Args) _NOEXCEPT
Definition: tuple:910
auto _Call_binder(_Invoker_ret< _Ret >, index_sequence< _Ix...>, _Cv_FD &_Obj, _Cv_tuple_TiD &_Tpl, _Untuple &&_Ut) -> decltype(_Invoker_ret< _Ret >::_Call(_Obj, _Fix_arg(_STD get< _Ix >(_Tpl), _STD move(_Ut))...))
Definition: functional:811
Definition: type_traits:1545
#define _STD
Definition: yvals.h:555
constexpr _Ty && forward(typename remove_reference< _Ty >::type &_Arg) _NOEXCEPT
Definition: type_traits:1332
#define _FUNCTIONAL_
#define _GET_FUNCTION_IMPL (   CALL_OPT,
  X1,
  X2 
)
Value:
template<class _Ret, \
class... _Types> \
struct _Get_function_impl<_Ret CALL_OPT (_Types...)> \
{ /* determine type from argument list */ \
typedef _Func_class<_Ret, _Types...> type; \
};
Definition: functional:451

Enumeration Type Documentation

anonymous enum
private
Enumerator
_EEN_IMPL 
427 {_EEN_IMPL = _Small_object_num_ptrs - 1}; // helper for expression evaluator
_STD_BEGIN constexpr int _Small_object_num_ptrs
Definition: typeinfo:38
Definition: functional:427

Function Documentation

template<class _Ret , size_t... _Ix, class _Cv_FD , class _Cv_tuple_TiD , class _Untuple >
auto _Call_binder ( _Invoker_ret< _Ret >  ,
index_sequence< _Ix...>  ,
_Cv_FD &  _Obj,
_Cv_tuple_TiD &  _Tpl,
_Untuple &&  _Ut 
) -> decltype(_Invoker_ret<_Ret>::_Call(_Obj, _Fix_arg(_STD get<_Ix>(_Tpl), _STD move(_Ut))...))
inlineprivate
814  { // bind() and bind<R>() invocation
815  return (_Invoker_ret<_Ret>::_Call(_Obj, _Fix_arg(_STD get<_Ix>(_Tpl), _STD move(_Ut))...));
816  }
Definition: type_traits:1545
auto _Fix_arg(_Cv_TiD &_Tid, _Untuple &&_Ut) -> decltype(_Select_fixer< _Cv_TiD >::_Fix(_Tid, _STD move(_Ut)))
Definition: functional:797
constexpr remove_reference< _Ty >::type && move(_Ty &&_Arg) _NOEXCEPT
Definition: type_traits:1349
template<class _Cv_TiD , class _Untuple >
auto _Fix_arg ( _Cv_TiD &  _Tid,
_Untuple &&  _Ut 
) -> decltype(_Select_fixer<_Cv_TiD>::_Fix(_Tid, _STD move(_Ut)))
inlineprivate
799  { // translate an argument for bind
800  return (_Select_fixer<_Cv_TiD>::_Fix(_Tid, _STD move(_Ut)));
801  }
Definition: functional:733
constexpr remove_reference< _Ty >::type && move(_Ty &&_Arg) _NOEXCEPT
Definition: type_traits:1349
_Ptrt* _Getimpl ( ) const
private
429  { // get pointer to object
431  }
_STD_BEGIN constexpr int _Small_object_num_ptrs
Definition: typeinfo:38
_Storage _Mystorage
Definition: functional:426
_Ptrt * _Ptrs[_Small_object_num_ptrs]
Definition: functional:423
const void * _Getspace ( )
private
439  { // get pointer to storage space
440  return (&_Mystorage);
441  }
_Storage _Mystorage
Definition: functional:426
bool _Local ( ) const
private
415  { // test for locally stored copy of object
416  return (_Getimpl() == _Getspace());
417  }
_Ptrt * _Getimpl() const _NOEXCEPT
Definition: functional:428
void * _Getspace() _NOEXCEPT
Definition: functional:438
template<class _Impl >
_Set ( )
void _Set ( _Ptrt *  _Ptr)
private
434  { // store pointer to object
436  }
_STD_BEGIN constexpr int _Small_object_num_ptrs
Definition: typeinfo:38
_Storage _Mystorage
Definition: functional:426
_Ptrt * _Ptrs[_Small_object_num_ptrs]
Definition: functional:423
void _Swap ( _Myt &  _Right)
387  { // swap contents with contents of _Right
388  if (!_Local() && !_Right._Local())
389  { // just swap pointers
390  _Ptrt *_Temp = _Getimpl();
391  _Set(_Right._Getimpl());
392  _Right._Set(_Temp);
393  }
394  else
395  { // do three-way move
396  _Myt _Temp;
397  _Temp._Reset_move(_STD move(*this));
398  _Reset_move(_STD move(_Right));
399  _Right._Reset_move(_STD move(_Temp));
400  }
401  }
_Ptrt * _Getimpl() const _NOEXCEPT
Definition: functional:428
bool _Local() const _NOEXCEPT
Definition: functional:414
_Set(0)
constexpr remove_reference< _Ty >::type && move(_Ty &&_Arg) _NOEXCEPT
Definition: type_traits:1349
constexpr const _Ty &() _Right
Definition: algorithm:3723
const void* _Target ( const type_info _Info) const
409  { // return pointer to stored object
410  return (_Getimpl() ? _Getimpl()->_Target(_Info) : 0);
411  }
_Ptrt * _Getimpl() const _NOEXCEPT
Definition: functional:428
const void * _Target(const type_info &_Info) const _NOEXCEPT
Definition: functional:408
const type_info& _Target_type ( ) const
404  { // return type information for stored object
405  return (_Getimpl() ? _Getimpl()->_Target_type() : typeid(void));
406  }
_Ptrt * _Getimpl() const _NOEXCEPT
Definition: functional:428
const type_info & _Target_type() const _NOEXCEPT
Definition: functional:403
template<class _Ty >
bool _Test_callable ( const _Ty &  _Arg,
true_type   
)
inline
72  { // std::function must store non-null testable callable objects
73  return (!!_Arg);
74  }
template<class _Ty >
bool _Test_callable ( const _Ty &  ,
false_type   
)
inline
78  { // std::function must store arbitrary callable objects
79  return (true);
80  }
template<class _Ty >
bool _Test_callable ( const _Ty &  _Arg)
inline
84  { // determine whether std::function must store _Arg
87  return (_Test_callable(_Arg, _Testable));
88  }
Definition: type_traits:70
Definition: xtr1common:50
bool _Test_callable(const _Ty &_Arg, true_type) _NOEXCEPT
Definition: functional:71
Definition: type_traits:366
template<class _Fty >
bool _Test_callable ( const function< _Fty > &  _Arg)
inline
92  { // determine whether std::function must store _Arg
93  return (!!_Arg);
94  }
_CRTIMP2_PURE void __CLRCALL_PURE_OR_CDECL _Xbad_function_call ( )
template<class _Fx , class... _Types>
_Binder<_Unforced, _Fx, _Types...> bind ( _Fx &&  _Func,
_Types &&...  _Args 
)
inlineprivate
879  { // bind a callable object with an implicit return type
881  _STD forward<_Fx>(_Func), _STD forward<_Types>(_Args)...));
882  }
Definition: functional:690
template<class _Ret , class _Fx , class... _Types>
_Binder<_Ret, _Fx, _Types...> bind ( _Fx &&  _Func,
_Types &&...  _Args 
)
inlineprivate
889  { // bind a callable object with an explicit return type
891  _STD forward<_Fx>(_Func), _STD forward<_Types>(_Args)...));
892  }
Definition: functional:690
template<class _Rx , class _Ty >
_Mem_fn<_Rx _Ty::*> mem_fn ( _Rx _Ty::*  _Pm)
inline
43  { // wrap a pointer to member function/data
44  return (_Mem_fn<_Rx _Ty::*>(_Pm));
45  }
Definition: functional:20
template<class _Fty >
bool operator!= ( const function< _Fty > &  _Other,
nullptr_t   
)
inlineprivate
635  { // compare to null pointer
636  return (static_cast<bool>(_Other));
637  }
template<class _Fty >
bool operator!= ( nullptr_t  ,
const function< _Fty > &  _Other 
)
inlineprivate
642  { // compare to null pointer
643  return (static_cast<bool>(_Other));
644  }
template<class _Fty >
bool operator== ( const function< _Fty > &  _Other,
nullptr_t   
)
inlineprivate
621  { // compare to null pointer
622  return (!_Other);
623  }
template<class _Fty >
bool operator== ( nullptr_t  ,
const function< _Fty > &  _Other 
)
inlineprivate
628  { // compare to null pointer
629  return (!_Other);
630  }
template<class _Fty >
void swap ( function< _Fty > &  _Left,
function< _Fty > &  _Right 
)
inlineprivate
613  { // swap contents of _Left with contents of _Right
614  _Left.swap(_Right);
615  }
void swap(_Myt &_Right) _NOEXCEPT
Definition: functional:581

Variable Documentation

_Storage _Mystorage
constexpr size_t _Space_size = (_Small_object_num_ptrs - 1) * sizeof (void *)
template<class _Ty >
constexpr bool is_bind_expression_v = is_bind_expression<_Ty>::value
template<class _Ty >
constexpr int is_placeholder_v = is_placeholder<_Ty>::value