43#ifndef _RWSTD_RW_PAIR_H_INCLUDED
44#define _RWSTD_RW_PAIR_H_INCLUDED
46#ifndef _RWSTD_RW_FUNCBASE_H_INCLUDED
55template <
class _TypeT,
class _TypeU>
58 typedef _TypeT first_type;
59 typedef _TypeU second_type;
66#ifndef _RWSTD_NO_EMPTY_MEM_INITIALIZER
67 : first (), second () { }
70 : first (first_type ()), second (second_type ()) { }
74 pair (
const first_type &__x,
const second_type &__y)
75 : first (__x), second (__y) { }
78 template <
class _TypeX,
class _TypeY>
79 pair (
const pair <_TypeX, _TypeY> &__rhs)
80 : first (__rhs.first), second (__rhs.second) { }
83 template <
class _TypeX,
class _TypeY>
84 pair<_TypeT, _TypeU>& operator= (
const pair <_TypeX, _TypeY> &__rhs) {
85 return first = __rhs.first, second = __rhs.second, *
this;
92template <
class _TypeT,
class _TypeU>
94operator== (
const pair<_TypeT, _TypeU>& __x,
const pair<_TypeT, _TypeU>& __y)
96 return __x.first == __y.first && __x.second == __y.second;
100template <
class _TypeT,
class _TypeU>
102operator!= (
const pair<_TypeT, _TypeU>& __x,
const pair<_TypeT, _TypeU>& __y)
104 return !(__x == __y);
109template <
class _TypeT,
class _TypeU>
111operator< (
const pair<_TypeT, _TypeU>& __x,
const pair<_TypeT, _TypeU>& __y)
113 _STD::less<_TypeT> __lessT;
116 return __lessT (__x.first, __y.first)
117 || ( !__lessT (__y.first, __x.first)
118 && _STD::less<_TypeU>()(__x.second, __y.second));
122template <
class _TypeT,
class _TypeU>
124operator> (
const pair<_TypeT, _TypeU>& __x,
const pair<_TypeT, _TypeU>& __y)
130template <
class _TypeT,
class _TypeU>
132operator>= (
const pair<_TypeT, _TypeU>& __x,
const pair<_TypeT, _TypeU>& __y)
138template <
class _TypeT,
class _TypeU>
140operator<= (
const pair<_TypeT, _TypeU>& __x,
const pair<_TypeT, _TypeU>& __y)
147template <
class _TypeT,
class _TypeU>
148inline pair<_TypeT, _TypeU>
149make_pair (_TypeT __x, _TypeU __y)
151 return pair<_TypeT, _TypeU>(__x, __y);
#define _RWSTD_NAMESPACE(name)
bool operator>(const DistancePair &lhs, const DistancePair &rhs)
bool operator==(const json_pointer< RefStringTypeLhs > &lhs, const json_pointer< RefStringTypeRhs > &rhs) noexcept
bool operator!=(const json_pointer< RefStringTypeLhs > &lhs, const json_pointer< RefStringTypeRhs > &rhs) noexcept
bool operator<(const json_pointer< RefStringTypeLhs > &lhs, const json_pointer< RefStringTypeRhs > &rhs) noexcept