STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Classes | Namespaces | Macros | Typedefs | Functions | Variables
utility File Reference
#include <xstddef>
#include <iosfwd>
#include <type_traits>

Classes

struct  piecewise_construct_t
 
class  tuple< _Types >
 
struct  pair< _Ty1, _Ty2 >
 
class  array< _Ty, _Size >
 
struct  tuple_size< _Tuple >
 
struct  tuple_size< array< _Ty, _Size > >
 
struct  tuple_size< pair< _Ty1, _Ty2 > >
 
struct  tuple_size< tuple< _Types...> >
 
struct  tuple_size< const _Tuple >
 
struct  tuple_size< volatile _Tuple >
 
struct  tuple_size< const volatile _Tuple >
 
struct  tuple_element< _Index, _Tuple >
 
struct  tuple_element< _Idx, array< _Ty, _Size > >
 
struct  tuple_element< 0, pair< _Ty1, _Ty2 > >
 
struct  tuple_element< 1, pair< _Ty1, _Ty2 > >
 
struct  tuple_element< _Index, tuple<> >
 
struct  tuple_element< 0, tuple< _This, _Rest...> >
 
struct  tuple_element< _Index, tuple< _This, _Rest...> >
 
struct  tuple_element< _Index, const _Tuple >
 
struct  tuple_element< _Index, volatile _Tuple >
 
struct  tuple_element< _Index, const volatile _Tuple >
 

Namespaces

 rel_ops
 

Macros

#define _UTILITY_
 

Typedefs

template<size_t _Index, class _Tuple >
using tuple_element_t = typename tuple_element< _Index, _Tuple >::type
 

Functions

template<class _FwdIt1 , class _FwdIt2 >
_STD_BEGIN void iter_swap (_FwdIt1 _Left, _FwdIt2 _Right)
 
template<class _Ty , size_t _Size, class >
void swap (_Ty(&_Left)[_Size], _Ty(&_Right)[_Size]) _NOEXCEPT_OP(_Is_nothrow_swappable< _Ty >
 
template<class _Ty , class >
void swap (_Ty &_Left, _Ty &_Right) _NOEXCEPT_OP(is_nothrow_move_constructible< _Ty >
 
template<class _Ty >
void _Swap_adl (_Ty &_Left, _Ty &_Right) _NOEXCEPT_OP(_Is_nothrow_swappable< _Ty >
 
template<class _Ty1 , class _Ty2 , class = enable_if_t<_Is_swappable<_Ty1>::value && _Is_swappable<_Ty2>::value>>
void swap (pair< _Ty1, _Ty2 > &_Left, pair< _Ty1, _Ty2 > &_Right) _NOEXCEPT_OP(_NOEXCEPT_OP(_Left.swap(_Right)))
 
template<class _Ty1 , class _Ty2 >
constexpr bool operator== (const pair< _Ty1, _Ty2 > &_Left, const pair< _Ty1, _Ty2 > &_Right)
 
template<class _Ty1 , class _Ty2 >
constexpr bool operator!= (const pair< _Ty1, _Ty2 > &_Left, const pair< _Ty1, _Ty2 > &_Right)
 
template<class _Ty1 , class _Ty2 >
constexpr bool operator< (const pair< _Ty1, _Ty2 > &_Left, const pair< _Ty1, _Ty2 > &_Right)
 
template<class _Ty1 , class _Ty2 >
constexpr bool operator> (const pair< _Ty1, _Ty2 > &_Left, const pair< _Ty1, _Ty2 > &_Right)
 
template<class _Ty1 , class _Ty2 >
constexpr bool operator<= (const pair< _Ty1, _Ty2 > &_Left, const pair< _Ty1, _Ty2 > &_Right)
 
template<class _Ty1 , class _Ty2 >
constexpr bool operator>= (const pair< _Ty1, _Ty2 > &_Left, const pair< _Ty1, _Ty2 > &_Right)
 
template<class _Ty1 , class _Ty2 >
constexpr pair< typename _Unrefwrap< _Ty1 >::type, typename _Unrefwrap< _Ty2 >::type > make_pair (_Ty1 &&_Val1, _Ty2 &&_Val2)
 
template<class _Ty >
bool rel_ops::operator!= (const _Ty &_Left, const _Ty &_Right)
 
template<class _Ty >
bool rel_ops::operator> (const _Ty &_Left, const _Ty &_Right)
 
template<class _Ty >
bool rel_ops::operator<= (const _Ty &_Left, const _Ty &_Right)
 
template<class _Ty >
bool rel_ops::operator>= (const _Ty &_Left, const _Ty &_Right)
 
template<class _Ret , class _Pair >
constexpr _Ret _Pair_get (_Pair &_Pr, integral_constant< size_t, 0 >) _NOEXCEPT
 
template<class _Ret , class _Pair >
constexpr _Ret _Pair_get (_Pair &_Pr, integral_constant< size_t, 1 >) _NOEXCEPT
 
template<size_t _Idx, class _Ty1 , class _Ty2 >
constexpr tuple_element< _Idx, pair< _Ty1, _Ty2 > >::type & get (pair< _Ty1, _Ty2 > &_Pr) _NOEXCEPT
 
template<class _Ty1 , class _Ty2 >
constexpr _Ty1 & get (pair< _Ty1, _Ty2 > &_Pr) _NOEXCEPT
 
template<class _Ty2 , class _Ty1 >
constexpr _Ty2 & get (pair< _Ty1, _Ty2 > &_Pr) _NOEXCEPT
 
template<size_t _Idx, class _Ty1 , class _Ty2 >
constexpr const tuple_element< _Idx, pair< _Ty1, _Ty2 > >::type & get (const pair< _Ty1, _Ty2 > &_Pr) _NOEXCEPT
 
template<class _Ty1 , class _Ty2 >
constexpr const _Ty1 & get (const pair< _Ty1, _Ty2 > &_Pr) _NOEXCEPT
 
template<class _Ty2 , class _Ty1 >
constexpr const _Ty2 & get (const pair< _Ty1, _Ty2 > &_Pr) _NOEXCEPT
 
template<size_t _Idx, class _Ty1 , class _Ty2 >
constexpr tuple_element< _Idx, pair< _Ty1, _Ty2 > >::type && get (pair< _Ty1, _Ty2 > &&_Pr) _NOEXCEPT
 
template<class _Ty1 , class _Ty2 >
constexpr _Ty1 && get (pair< _Ty1, _Ty2 > &&_Pr) _NOEXCEPT
 
template<class _Ty2 , class _Ty1 >
constexpr _Ty2 && get (pair< _Ty1, _Ty2 > &&_Pr) _NOEXCEPT
 
template<class _Ty , class _Other = _Ty>
_Ty exchange (_Ty &_Val, _Other &&_New_val)
 
template<class _Ty >
constexpr add_const_t< _Ty > & as_const (_Ty &_Val) _NOEXCEPT
 
template<class _Ty >
void as_const (const _Ty &&)=delete
 

Variables

constexpr piecewise_construct_t piecewise_construct {}
 

Macro Definition Documentation

#define _UTILITY_

Typedef Documentation

template<size_t _Index, class _Tuple >
using tuple_element_t = typename tuple_element<_Index, _Tuple>::type

Function Documentation

template<class _Ret , class _Pair >
constexpr _Ret _Pair_get ( _Pair &  _Pr,
integral_constant< size_t, 0 >   
)
inline
502  { // get reference to element 0 in pair _Pr
503  return (_Pr.first);
504  }
template<class _Ret , class _Pair >
constexpr _Ret _Pair_get ( _Pair &  _Pr,
integral_constant< size_t, 1 >   
)
inline
510  { // get reference to element 1 in pair _Pr
511  return (_Pr.second);
512  }
template<class _Ty >
void _Swap_adl ( _Ty &  _Left,
_Ty &  _Right 
)
inline
58  { // exchange values stored at _Left and _Right, using ADL
59  swap(_Left, _Right);
60  }
constexpr const _Ty &() _Left
Definition: algorithm:3590
void swap(_Ty(&_Left)[_Size], _Ty(&_Right)[_Size]) _NOEXCEPT_OP(_Is_nothrow_swappable< _Ty >
Definition: utility:30
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Ty >
constexpr add_const_t<_Ty>& as_const ( _Ty &  _Val)
inline
600  { // view _Val through const lenses
601  return (_Val);
602  }
_In_ int _Val
Definition: vcruntime_string.h:62
template<class _Ty >
void as_const ( const _Ty &&  )
delete
template<class _Ty , class _Other = _Ty>
_Ty exchange ( _Ty &  _Val,
_Other &&  _New_val 
)
inline
591  { // assign _New_val to _Val, return previous _Val
592  _Ty _Old_val = _STD move(_Val);
593  _Val = _STD forward<_Other>(_New_val);
594  return (_Old_val);
595  }
_In_ int _Val
Definition: vcruntime_string.h:62
constexpr remove_reference< _Ty >::type && move(_Ty &&_Arg) _NOEXCEPT
Definition: type_traits:1290
template<size_t _Idx, class _Ty1 , class _Ty2 >
constexpr tuple_element<_Idx, pair<_Ty1, _Ty2> >::type& get ( pair< _Ty1, _Ty2 > &  _Pr)
inline
519  { // get reference to element at _Idx in pair _Pr
520  typedef typename tuple_element<_Idx, pair<_Ty1, _Ty2> >::type& _Rtype;
521  return (_Pair_get<_Rtype>(_Pr, integral_constant<size_t, _Idx>()));
522  }
Definition: xtr1common:22
Definition: utility:416
template<class _Ty1 , class _Ty2 >
constexpr _Ty1& get ( pair< _Ty1, _Ty2 > &  _Pr)
inline
527  { // get reference to element _Ty1 in pair _Pr
528  return (_STD get<0>(_Pr));
529  }
template<class _Ty2 , class _Ty1 >
constexpr _Ty2& get ( pair< _Ty1, _Ty2 > &  _Pr)
inline
534  { // get reference to element _Ty2 in pair _Pr
535  return (_STD get<1>(_Pr));
536  }
template<size_t _Idx, class _Ty1 , class _Ty2 >
constexpr const tuple_element<_Idx, pair<_Ty1, _Ty2> >::type& get ( const pair< _Ty1, _Ty2 > &  _Pr)
inline
543  { // get const reference to element at _Idx in pair _Pr
544  typedef const typename tuple_element<_Idx, pair<_Ty1, _Ty2> >::type&
545  _Ctype;
546  return (_Pair_get<_Ctype>(_Pr, integral_constant<size_t, _Idx>()));
547  }
Definition: xtr1common:22
Definition: utility:416
template<class _Ty1 , class _Ty2 >
constexpr const _Ty1& get ( const pair< _Ty1, _Ty2 > &  _Pr)
inline
552  { // get const reference to element _Ty1 in pair _Pr
553  return (_STD get<0>(_Pr));
554  }
template<class _Ty2 , class _Ty1 >
constexpr const _Ty2& get ( const pair< _Ty1, _Ty2 > &  _Pr)
inline
559  { // get const reference to element _Ty2 in pair _Pr
560  return (_STD get<1>(_Pr));
561  }
template<size_t _Idx, class _Ty1 , class _Ty2 >
constexpr tuple_element<_Idx, pair<_Ty1, _Ty2> >::type&& get ( pair< _Ty1, _Ty2 > &&  _Pr)
inline
568  { // get rvalue reference to element at _Idx in pair _Pr
569  typedef typename tuple_element<_Idx, pair<_Ty1, _Ty2> >::type&& _RRtype;
570  return (_STD forward<_RRtype>(_STD get<_Idx>(_Pr)));
571  }
Definition: utility:416
template<class _Ty1 , class _Ty2 >
constexpr _Ty1&& get ( pair< _Ty1, _Ty2 > &&  _Pr)
inline
576  { // get rvalue reference to element _Ty1 in pair _Pr
577  return (_STD get<0>(_STD move(_Pr)));
578  }
constexpr remove_reference< _Ty >::type && move(_Ty &&_Arg) _NOEXCEPT
Definition: type_traits:1290
template<class _Ty2 , class _Ty1 >
constexpr _Ty2&& get ( pair< _Ty1, _Ty2 > &&  _Pr)
inline
583  { // get rvalue reference to element _Ty2 in pair _Pr
584  return (_STD get<1>(_STD move(_Pr)));
585  }
constexpr remove_reference< _Ty >::type && move(_Ty &&_Arg) _NOEXCEPT
Definition: type_traits:1290
template<class _FwdIt1 , class _FwdIt2 >
_STD_BEGIN void iter_swap ( _FwdIt1  _Left,
_FwdIt2  _Right 
)
inline
22  { // swap *_Left and *_Right
23  swap(*_Left, *_Right);
24  }
constexpr const _Ty &() _Left
Definition: algorithm:3590
void swap(_Ty(&_Left)[_Size], _Ty(&_Right)[_Size]) _NOEXCEPT_OP(_Is_nothrow_swappable< _Ty >
Definition: utility:30
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Ty1 , class _Ty2 >
constexpr pair<typename _Unrefwrap<_Ty1>::type, typename _Unrefwrap<_Ty2>::type> make_pair ( _Ty1 &&  _Val1,
_Ty2 &&  _Val2 
)
inline
324  { // return pair composed from arguments
326  typename _Unrefwrap<_Ty2>::type> _Mypair;
327  return (_Mypair(_STD forward<_Ty1>(_Val1),
328  _STD forward<_Ty2>(_Val2)));
329  }
Definition: utility:75
_Unrefwrap_helper< _Ty1 >::type type
Definition: type_traits:1668
template<class _Ty1 , class _Ty2 >
constexpr bool operator!= ( const pair< _Ty1, _Ty2 > &  _Left,
const pair< _Ty1, _Ty2 > &  _Right 
)
inline
280  { // test for pair inequality
281  return (!(_Left == _Right));
282  }
template<class _Ty1 , class _Ty2 >
constexpr bool operator< ( const pair< _Ty1, _Ty2 > &  _Left,
const pair< _Ty1, _Ty2 > &  _Right 
)
inline
288  { // test if _Left < _Right for pairs
289  return (_Left.first < _Right.first ||
290  (!(_Right.first < _Left.first) && _Left.second < _Right.second));
291  }
_Ty2 second
Definition: utility:243
_Ty1 first
Definition: utility:242
template<class _Ty1 , class _Ty2 >
constexpr bool operator<= ( const pair< _Ty1, _Ty2 > &  _Left,
const pair< _Ty1, _Ty2 > &  _Right 
)
inline
305  { // test if _Left <= _Right for pairs
306  return (!(_Right < _Left));
307  }
template<class _Ty1 , class _Ty2 >
constexpr bool operator== ( const pair< _Ty1, _Ty2 > &  _Left,
const pair< _Ty1, _Ty2 > &  _Right 
)
inline
272  { // test for pair equality
273  return (_Left.first == _Right.first && _Left.second == _Right.second);
274  }
_Ty2 second
Definition: utility:243
_Ty1 first
Definition: utility:242
template<class _Ty1 , class _Ty2 >
constexpr bool operator> ( const pair< _Ty1, _Ty2 > &  _Left,
const pair< _Ty1, _Ty2 > &  _Right 
)
inline
297  { // test if _Left > _Right for pairs
298  return (_Right < _Left);
299  }
template<class _Ty1 , class _Ty2 >
constexpr bool operator>= ( const pair< _Ty1, _Ty2 > &  _Left,
const pair< _Ty1, _Ty2 > &  _Right 
)
inline
313  { // test if _Left >= _Right for pairs
314  return (!(_Left < _Right));
315  }
template<class _Ty , size_t _Size, class >
void swap ( _Ty(&)  _Left[_Size],
_Ty(&)  _Right[_Size] 
)
inline
32  { // exchange arrays stored at _Left and _Right
33  if (&_Left != &_Right)
34  { // worth swapping, swap ranges
35  _Ty *_First1 = _Left;
36  _Ty *_Last1 = _First1 + _Size;
37  _Ty *_First2 = _Right;
38  for (; _First1 != _Last1; ++_First1, ++_First2)
39  _STD iter_swap(_First1, _First2);
40  }
41  }
constexpr const _Ty &() _Left
Definition: algorithm:3590
_STD_BEGIN void iter_swap(_FwdIt1 _Left, _FwdIt2 _Right)
Definition: utility:21
_Size
Definition: vcruntime_string.h:36
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Ty , class >
void swap ( _Ty &  _Left,
_Ty &  _Right 
)
inline
48  { // exchange values stored at _Left and _Right
49  _Ty _Tmp = _STD move(_Left);
50  _Left = _STD move(_Right);
51  _Right = _STD move(_Tmp);
52  }
constexpr const _Ty &() _Left
Definition: algorithm:3590
constexpr remove_reference< _Ty >::type && move(_Ty &&_Arg) _NOEXCEPT
Definition: type_traits:1290
constexpr const _Ty &() _Right
Definition: algorithm:3591
template<class _Ty1 , class _Ty2 , class = enable_if_t<_Is_swappable<_Ty1>::value && _Is_swappable<_Ty2>::value>>
void swap ( pair< _Ty1, _Ty2 > &  _Left,
pair< _Ty1, _Ty2 > &  _Right 
)
inline
264  { // swap _Left and _Right pairs
265  _Left.swap(_Right);
266  }
void swap(_Myt &_Right) _NOEXCEPT_OP(_Is_nothrow_swappable< _Ty1 >
Definition: utility:245

Variable Documentation

constexpr piecewise_construct_t piecewise_construct {}