STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Classes | Macros | Typedefs | Functions | Variables
tuple File Reference
#include <new>
#include <type_traits>
#include <xutility>

Classes

struct  _Tuple_implicit_val0< _Same, _Dest, _Srcs >
 
struct  _Tuple_implicit_val0< true, tuple< _Dests...>, _Srcs...>
 
struct  _Tuple_implicit_val< _Dest, _Srcs >
 
struct  _Tuple_explicit_val0< _Same, _Dest, _Srcs >
 
struct  _Tuple_explicit_val0< true, tuple< _Dests...>, _Srcs...>
 
struct  _Tuple_explicit_val< _Dest, _Srcs >
 
struct  _Tuple_convert_copy< _Myt, _Other >
 
struct  _Tuple_convert_copy< tuple< _This >, _Uty >
 
struct  _Tuple_convert_move< _Myt, _Other >
 
struct  _Tuple_convert_move< tuple< _This >, _Uty >
 
struct  _Tuple_perfect_val< _Myt, _This2, _Rest2 >
 
struct  _Tuple_perfect_val< _Myt, _This2 >
 
struct  _Ignore
 
struct  _Tuple_alloc_t
 
struct  _Tuple_val< _Ty >
 
struct  _Exact_args_t
 
struct  _Unpack_tuple_t
 
struct  _Alloc_exact_args_t
 
struct  _Alloc_unpack_tuple_t
 
class  tuple< _Types >
 
class  tuple<>
 
class  tuple< _This, _Rest...>
 
struct  _Tuple_element< _Ty, _Tuple >
 
struct  _Tuple_element< _This, tuple< _This, _Rest...> >
 
struct  _Tuple_element< _Ty, tuple< _This, _Rest...> >
 
struct  _Tuple_element< _Ty, tuple<> >
 
struct  _Tuple_element< _Ty, const _Tuple >
 
struct  _Tuple_element< _Ty, volatile _Tuple >
 
struct  _Tuple_element< _Ty, const volatile _Tuple >
 
struct  _Cat_sequences< _Seq_type1, _Seq_type2 >
 
struct  _Cat_sequences< integer_sequence< size_t, _Indexes1...>, integer_sequence< size_t, _Indexes2...> >
 
class  array< _Ty, _Size >
 
struct  _View_as_tuple< _Ty, _For_array >
 
struct  _View_as_tuple< tuple< _Types...> >
 
struct  _View_as_tuple< pair< _Ty1, _Ty2 > >
 
struct  _View_as_tuple< array< _Ty, 0 >, _Types...>
 
struct  _View_as_tuple< array< _Ty, _Size >, _Types...>
 
struct  _Repeat_for< _Nx, _Ty >
 
struct  _Tuple_cat2< _Ret, _Kx_arg, _Ix_arg, _Ix_next, _Tuples >
 
struct  _Tuple_cat2< tuple< _Types1...>, _Kx_arg, integer_sequence< size_t, _Ix...>, _Ix_next, tuple< _Types2...>, _Rest...>
 
struct  _Tuple_cat1< _Tuples >
 
struct  std::uses_allocator< tuple< _Types...>, _Alloc >
 

Macros

#define _TUPLE_
 

Typedefs

template<class _Dest , class... _Srcs>
using _Tuple_implicit_t = enable_if_t< _Tuple_implicit_val< _Dest, _Srcs...>::value, int >
 
template<class _Dest , class... _Srcs>
using _Tuple_explicit_t = enable_if_t< _Tuple_explicit_val< _Dest, _Srcs...>::value, int >
 
template<class _Myt , class... _Other>
using _Tuple_convert_copy_t = typename _Tuple_convert_copy< _Myt, _Other...>::type
 
template<class _Myt , class... _Other>
using _Tuple_convert_move_t = typename _Tuple_convert_move< _Myt, _Other...>::type
 

Functions

template<class... _Types1, class... _Types2>
constexpr bool operator== (const tuple< _Types1...> &_Left, const tuple< _Types2...> &_Right)
 
template<class... _Types1, class... _Types2>
constexpr bool operator!= (const tuple< _Types1...> &_Left, const tuple< _Types2...> &_Right)
 
template<class... _Types1, class... _Types2>
constexpr bool operator< (const tuple< _Types1...> &_Left, const tuple< _Types2...> &_Right)
 
template<class... _Types1, class... _Types2>
constexpr bool operator>= (const tuple< _Types1...> &_Left, const tuple< _Types2...> &_Right)
 
template<class... _Types1, class... _Types2>
constexpr bool operator> (const tuple< _Types1...> &_Left, const tuple< _Types2...> &_Right)
 
template<class... _Types1, class... _Types2>
constexpr bool operator<= (const tuple< _Types1...> &_Left, const tuple< _Types2...> &_Right)
 
template<class... _Types, class = enable_if_t<conjunction<_Is_swappable<_Types>...>::value>>
void swap (tuple< _Types...> &_Left, tuple< _Types...> &_Right) _NOEXCEPT_OP(_NOEXCEPT_OP(_Left.swap(_Right)))
 
template<size_t _Index, class... _Types>
constexpr tuple_element< _Index, tuple< _Types...> >::type & get (tuple< _Types...> &_Tuple) _NOEXCEPT
 
template<size_t _Index, class... _Types>
constexpr const tuple_element< _Index, tuple< _Types...> >::type & get (const tuple< _Types...> &_Tuple) _NOEXCEPT
 
template<size_t _Index, class... _Types>
constexpr tuple_element< _Index, tuple< _Types...> >::type && get (tuple< _Types...> &&_Tuple) _NOEXCEPT
 
template<class _Ty , class... _Types>
constexpr _Ty & get (tuple< _Types...> &_Tuple) _NOEXCEPT
 
template<class _Ty , class... _Types>
constexpr const _Ty & get (const tuple< _Types...> &_Tuple) _NOEXCEPT
 
template<class _Ty , class... _Types>
constexpr _Ty && get (tuple< _Types...> &&_Tuple) _NOEXCEPT
 
template<class... _Types>
constexpr tuple< typename _Unrefwrap< _Types >::type...> make_tuple (_Types &&..._Args)
 
template<class... _Types>
constexpr tuple< _Types &...> tie (_Types &..._Args) _NOEXCEPT
 
template<class... _Types>
constexpr tuple< _Types &&...> forward_as_tuple (_Types &&..._Args) _NOEXCEPT
 
template<size_t _Idx, class _Ty , size_t _Size>
constexpr _Ty & get (array< _Ty, _Size > &_Arr) _NOEXCEPT
 
template<size_t _Idx, class _Ty , size_t _Size>
constexpr const _Ty & get (const array< _Ty, _Size > &_Arr) _NOEXCEPT
 
template<size_t _Idx, class _Ty , size_t _Size>
constexpr _Ty && get (array< _Ty, _Size > &&_Arr) _NOEXCEPT
 
template<class _Ret , size_t... _Kx, size_t... _Ix, class _Ty >
constexpr _Ret _Tuple_cat (integer_sequence< size_t, _Kx...>, integer_sequence< size_t, _Ix...>, _Ty &&_Arg)
 
template<class _Ret , class _Ty >
constexpr _Ret _Tuple_cat (integer_sequence< size_t >, integer_sequence< size_t >, _Ty &&)
 
template<class... _Tuples>
constexpr _Tuple_cat1< _Tuples...>::type tuple_cat (_Tuples &&..._Tpls)
 
template<class _Tpl , class _Fx , size_t... _Indices>
void _For_each_tuple_element_impl (_Tpl &&_Tuple, _Fx _Func, integer_sequence< size_t, _Indices...>)
 
template<class _Tpl , class _Fx >
void _For_each_tuple_element (_Tpl &&_Tuple, _Fx _Func)
 

Variables

constexpr _Ignore ignore {}
 
constexpr _Tuple_alloc_t _Tuple_alloc {}
 

Macro Definition Documentation

#define _TUPLE_

Typedef Documentation

template<class _Myt , class... _Other>
using _Tuple_convert_copy_t = typename _Tuple_convert_copy<_Myt, _Other...>::type
template<class _Myt , class... _Other>
using _Tuple_convert_move_t = typename _Tuple_convert_move<_Myt, _Other...>::type
template<class _Dest , class... _Srcs>
using _Tuple_explicit_t = enable_if_t<_Tuple_explicit_val<_Dest, _Srcs...>::value, int>
template<class _Dest , class... _Srcs>
using _Tuple_implicit_t = enable_if_t<_Tuple_implicit_val<_Dest, _Srcs...>::value, int>

Function Documentation

template<class _Tpl , class _Fx >
void _For_each_tuple_element ( _Tpl &&  _Tuple,
_Fx  _Func 
)
inline
1157  { // call _Func() on each element in _Tuple
1159  _STD forward<_Tpl>(_Tuple),
1160  _Func,
1161  make_integer_sequence<size_t,
1163  );
1164  }
Definition: utility:367
typename remove_reference< _Ty >::type remove_reference_t
Definition: type_traits:1838
void _For_each_tuple_element_impl(_Tpl &&_Tuple, _Fx _Func, integer_sequence< size_t, _Indices...>)
Definition: tuple:1145
__make_integer_seq< integer_sequence, _Ty, _Size > make_integer_sequence
Definition: type_traits:1245
template<class _Tpl , class _Fx , size_t... _Indices>
void _For_each_tuple_element_impl ( _Tpl &&  _Tuple,
_Fx  _Func,
integer_sequence< size_t, _Indices...>   
)
inline
1147  { // call _Func() on the _Indices elements of _Tuple
1148  int _Ignored[] = { (static_cast<void>(_Func(
1149  _STD get<_Indices>(_STD forward<_Tpl>(_Tuple))
1150  )), 0)... };
1151  (void)_Ignored;
1152  }
_CRT_BEGIN_C_HEADER typedef void(__CRTDECL *unexpected_handler)()
template<class _Ret , size_t... _Kx, size_t... _Ix, class _Ty >
constexpr _Ret _Tuple_cat ( integer_sequence< size_t, _Kx...>  ,
integer_sequence< size_t, _Ix...>  ,
_Ty &&  _Arg 
)
inline
1118  { // concatenate tuples
1119  return (_Ret(_STD get<_Kx>(_STD get<_Ix>(_STD forward<_Ty>(_Arg)))...));
1120  }
template<class _Ret , class _Ty >
constexpr _Ret _Tuple_cat ( integer_sequence< size_t ,
integer_sequence< size_t ,
_Ty &&   
)
inline
1126  { // TRANSITION, VSO#181496
1127  return (_Ret());
1128  }
template<class... _Types>
constexpr tuple<_Types&&...> forward_as_tuple ( _Types &&...  _Args)
inline
986  { // forward arguments in a tuple
987  return (tuple<_Types&&...>(_STD forward<_Types>(_Args)...));
988  }
Definition: tuple:226
template<size_t _Index, class... _Types>
constexpr tuple_element<_Index, tuple<_Types...> >::type& get ( tuple< _Types...> &  _Tuple)
inline
883  { // get reference to _Index element of tuple
884  typedef typename tuple_element<_Index, tuple<_Types...> >::_Ttype
885  _Ttype;
886  return (((_Ttype&)_Tuple)._Myfirst._Val);
887  }
Definition: utility:416
Definition: tuple:226
template<size_t _Index, class... _Types>
constexpr const tuple_element<_Index, tuple<_Types...> >::type& get ( const tuple< _Types...> &  _Tuple)
inline
893  { // get const reference to _Index element of tuple
894  typedef typename tuple_element<_Index, tuple<_Types...> >::_Ttype
895  _Ttype;
896  return (((_Ttype&)_Tuple)._Myfirst._Val);
897  }
Definition: utility:416
Definition: tuple:226
template<size_t _Index, class... _Types>
constexpr tuple_element<_Index, tuple<_Types...> >::type&& get ( tuple< _Types...> &&  _Tuple)
inline
903  { // get rvalue reference to _Index element of tuple
904  typedef typename tuple_element<_Index, tuple<_Types...> >::_Ttype
905  _Ttype;
906  typedef typename tuple_element<_Index, tuple<_Types...> >::type&&
907  _RRtype;
908  return (_STD forward<_RRtype>(((_Ttype&)_Tuple)._Myfirst._Val));
909  }
Definition: utility:416
Definition: tuple:226
template<class _Ty , class... _Types>
constexpr _Ty& get ( tuple< _Types...> &  _Tuple)
inline
915  { // get reference to _Ty element of tuple
916  typedef typename _Tuple_element<_Ty, tuple<_Types...> >::_Ttype _Ttype;
917  return (((_Ttype&)_Tuple)._Myfirst._Val);
918  }
Definition: tuple:822
Definition: tuple:226
template<class _Ty , class... _Types>
constexpr const _Ty& get ( const tuple< _Types...> &  _Tuple)
inline
923  { // get const reference to _Ty element of tuple
924  typedef typename _Tuple_element<_Ty, tuple<_Types...> >::_Ttype _Ttype;
925  return (((_Ttype&)_Tuple)._Myfirst._Val);
926  }
Definition: tuple:822
Definition: tuple:226
template<class _Ty , class... _Types>
constexpr _Ty&& get ( tuple< _Types...> &&  _Tuple)
inline
931  { // get rvalue reference to _Ty element of tuple
932  typedef typename _Tuple_element<_Ty, tuple<_Types...> >::_Ttype _Ttype;
933  return (_STD forward<_Ty&&>(((_Ttype&)_Tuple)._Myfirst._Val));
934  }
Definition: tuple:822
Definition: tuple:226
template<size_t _Idx, class _Ty , size_t _Size>
constexpr _Ty& get ( array< _Ty, _Size > &  _Arr)
494  { // return element at _Idx in array _Arr
495  static_assert(_Idx < _Size, "array index out of bounds");
496  return (_Arr._Elems[_Idx]);
497  }
_Ty _Elems[_Size]
Definition: array:212
_Size
Definition: vcruntime_string.h:36
template<size_t _Idx, class _Ty , size_t _Size>
constexpr const _Ty& get ( const array< _Ty, _Size > &  _Arr)
503  { // return element at _Idx in array _Arr
504  static_assert(_Idx < _Size, "array index out of bounds");
505  return (_Arr._Elems[_Idx]);
506  }
_Ty _Elems[_Size]
Definition: array:212
_Size
Definition: vcruntime_string.h:36
template<size_t _Idx, class _Ty , size_t _Size>
constexpr _Ty&& get ( array< _Ty, _Size > &&  _Arr)
512  { // return element at _Idx in array _Arr
513  static_assert(_Idx < _Size, "array index out of bounds");
514  return (_STD move(_Arr._Elems[_Idx]));
515  }
_Ty _Elems[_Size]
Definition: array:212
constexpr remove_reference< _Ty >::type && move(_Ty &&_Arg) _NOEXCEPT
Definition: type_traits:1290
_Size
Definition: vcruntime_string.h:36
template<class... _Types>
constexpr tuple<typename _Unrefwrap<_Types>::type...> make_tuple ( _Types &&...  _Args)
inline
966  { // make tuple from elements
967  typedef tuple<typename _Unrefwrap<_Types>::type...> _Ttype;
968  return (_Ttype(_STD forward<_Types>(_Args)...));
969  }
Definition: tuple:226
template<class... _Types1, class... _Types2>
constexpr bool operator!= ( const tuple< _Types1...> &  _Left,
const tuple< _Types2...> &  _Right 
)
inline
773  { // test if _Left != _Right
774  return (!(_Left == _Right));
775  }
template<class... _Types1, class... _Types2>
constexpr bool operator< ( const tuple< _Types1...> &  _Left,
const tuple< _Types2...> &  _Right 
)
inline
781  { // test if _Left < _Right
782  return (_Left._Less(_Right));
783  }
template<class... _Types1, class... _Types2>
constexpr bool operator<= ( const tuple< _Types1...> &  _Left,
const tuple< _Types2...> &  _Right 
)
inline
805  { // test if _Left <= _Right
806  return (!(_Right < _Left));
807  }
template<class... _Types1, class... _Types2>
constexpr bool operator== ( const tuple< _Types1...> &  _Left,
const tuple< _Types2...> &  _Right 
)
inline
765  { // test if _Left == _Right
766  return (_Left._Equals(_Right));
767  }
template<class... _Types1, class... _Types2>
constexpr bool operator> ( const tuple< _Types1...> &  _Left,
const tuple< _Types2...> &  _Right 
)
inline
797  { // test if _Left > _Right
798  return (_Right < _Left);
799  }
template<class... _Types1, class... _Types2>
constexpr bool operator>= ( const tuple< _Types1...> &  _Left,
const tuple< _Types2...> &  _Right 
)
inline
789  { // test if _Left >= _Right
790  return (!(_Left < _Right));
791  }
template<class... _Types, class = enable_if_t<conjunction<_Is_swappable<_Types>...>::value>>
void swap ( tuple< _Types...> &  _Left,
tuple< _Types...> &  _Right 
)
inline
814  { // swap _Left and _Right
815  return (_Left.swap(_Right));
816  }
template<class... _Types>
constexpr tuple<_Types&...> tie ( _Types &...  _Args)
inline
975  { // make tuple from elements
976  typedef tuple<_Types&...> _Ttype;
977  return (_Ttype(_Args...));
978  }
Definition: tuple:226
template<class... _Tuples>
constexpr _Tuple_cat1<_Tuples...>::type tuple_cat ( _Tuples &&...  _Tpls)
inline
1133  { // concatenate tuples
1134  typedef _Tuple_cat1<_Tuples...> _Cat1;
1135  return (_Tuple_cat<typename _Cat1::type>(
1136  typename _Cat1::_Kx_arg_seq(), typename _Cat1::_Ix_arg_seq(),
1137  _STD forward_as_tuple(_STD forward<_Tuples>(_Tpls)...)));
1138  }
constexpr tuple< _Types &&...> forward_as_tuple(_Types &&..._Args) _NOEXCEPT
Definition: tuple:985
Definition: tuple:1105

Variable Documentation

constexpr _Tuple_alloc_t _Tuple_alloc {}
constexpr _Ignore ignore {}