46#ifndef _RWSTD_RW_ALGOBASE_H_INCLUDED
47#define _RWSTD_RW_ALGOBASE_H_INCLUDED
58template <
class _TypeT>
59inline const _TypeT& (
min)(
const _TypeT& __a,
const _TypeT& __b)
61 return __b < __a ? __b : __a;
64template <
class _TypeT,
class _Compare>
65inline const _TypeT& (
min)(
const _TypeT& __a,
const _TypeT& __b, _Compare __cmp)
67 return __cmp (__b, __a) ? __b : __a;
72template <
class _TypeT>
73inline const _TypeT& (
max)(
const _TypeT& __a,
const _TypeT& __b)
75 return __a < __b ? __b : __a;
79template <
class _TypeT,
class _Compare>
81(
max)(
const _TypeT& __a,
const _TypeT& __b, _Compare __cmp)
83 return !(__cmp (__a, __b) ==
false) ? __b : __a;
88template <
class _InputIter,
class _OutputIter>
90copy (_InputIter __first, _InputIter __last, _OutputIter __res)
94 for (; !(__first == __last); ++__first,++__res)
101template <
class _B
idirIter1,
class _B
idirIter2>
103copy_backward (_BidirIter1 __first, _BidirIter1 __last, _BidirIter2 __res)
107 while (!(__first == __last))
108 *--__res = *--__last;
114template <
class _FwdIter,
class _TypeT>
115inline void fill (_FwdIter __first, _FwdIter __last,
const _TypeT &__val)
119 for ( ; !(__first == __last); ++__first)
124template <
class _OutputIter,
class _Size,
class _TypeT>
125inline void fill_n (_OutputIter __first, _Size __n,
const _TypeT &__val)
131 for (_RWSTD_PTRDIFF_T __inx = __n; 0 < __inx; --__inx, ++__first)
144 template <
class _TypeT,
class _TypeU>
145 bool operator() (
const _TypeT &__lhs,
const _TypeU &__rhs)
const {
153# define _RWSTD_LESS(ignore) _RW::__rw_lt ()
157template <
class _TypeT,
class _TypeU>
158inline void __rw_swap (_TypeT& __a, _TypeU& __b)
174template <
class _TypeT>
175inline void swap (_TypeT& __a, _TypeT& __b)
185template <
class _FwdIter1,
class _FwdIter2>
186inline void iter_swap (_FwdIter1 __a, _FwdIter2 __b)
191#ifndef _RWSTD_NO_CLASS_PARTIAL_SPEC
196 typename iterator_traits<_FwdIter1>::reference __ref1 (*__a);
197 typename iterator_traits<_FwdIter2>::reference __ref2 (*__b);
199 _RW::__rw_swap (__ref1, __ref2);
205 _RW::__rw_swap (*__a, *__b);
212template <
class _InputIter1,
class _InputIter2>
213inline pair<_InputIter1, _InputIter2>
214mismatch (_InputIter1 __first1, _InputIter1 __last1, _InputIter2 __first2)
218 while (!(__first1 == __last1) && *__first1 == *__first2) {
222 return pair<_InputIter1, _InputIter2> (__first1, __first2);
226template <
class _InputIter1,
class _InputIter2,
class _BinaryPredicate>
227inline pair<_InputIter1, _InputIter2>
228mismatch (_InputIter1 __first1, _InputIter1 __last1,
229 _InputIter2 __first2, _BinaryPredicate __pred)
233 while ( !(__first1 == __last1)
234 && !(__pred (*__first1, *__first2) ==
false)) {
238 return pair<_InputIter1, _InputIter2> (__first1, __first2);
243template <
class _InputIter1,
class _InputIter2>
245equal (_InputIter1 __first1, _InputIter1 __last1, _InputIter2 __first2)
247 return __last1 == _STD::mismatch (__first1, __last1, __first2).first;
251template <
class _InputIter1,
class _InputIter2,
class _BinaryPredicate>
252inline bool equal (_InputIter1 __first1, _InputIter1 __last1,
253 _InputIter2 __first2, _BinaryPredicate __pred)
255 return __last1 == _STD::mismatch (__first1, __last1,
256 __first2, __pred).first;
262template <
class _InputIter1,
class _InputIter2>
263bool lexicographical_compare (_InputIter1 __first1, _InputIter1 __last1,
264 _InputIter2 __first2, _InputIter2 __last2);
268template <
class _InputIter1,
class _InputIter2,
class _Compare>
269bool lexicographical_compare(_InputIter1 __first1, _InputIter1 __last1,
270 _InputIter2 __first2, _InputIter2 __last2,
276#ifdef _RWSTD_NO_IMPLICIT_INCLUSION
bool equal(const T &x, const U &y)
#define _RWSTD_NAMESPACE(name)
#define _RWSTD_ASSERT_RANGE(ign1, ign2)
#define _RWSTD_CONST_CAST(T, x)
NLOHMANN_BASIC_JSON_TPL_DECLARATION void swap(nlohmann::NLOHMANN_BASIC_JSON_TPL &j1, nlohmann::NLOHMANN_BASIC_JSON_TPL &j2) noexcept(//NOLINT(readability-inconsistent-declaration-parameter-name, cert-dcl58-cpp) is_nothrow_move_constructible< nlohmann::NLOHMANN_BASIC_JSON_TPL >::value &&//NOLINT(misc-redundant-expression, cppcoreguidelines-noexcept-swap, performance-noexcept-swap) is_nothrow_move_assignable< nlohmann::NLOHMANN_BASIC_JSON_TPL >::value)
exchanges the values of two JSON objects