Initial checkin for debug mode (version 2)
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@139711 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -593,9 +593,6 @@ template <class BidirectionalIterator, class Compare>
|
||||
#include <utility>
|
||||
#include <memory>
|
||||
#include <iterator>
|
||||
#ifdef _LIBCPP_DEBUG
|
||||
#include <cassert>
|
||||
#endif
|
||||
#include <cstdlib>
|
||||
|
||||
#pragma GCC system_header
|
||||
@@ -676,7 +673,7 @@ public:
|
||||
bool operator()(const _T1& __x, const _T2& __y) {return !__p_(__x, __y);}
|
||||
};
|
||||
|
||||
#ifdef _LIBCPP_DEBUG
|
||||
#ifdef _LIBCPP_DEBUG2
|
||||
|
||||
template <class _Compare>
|
||||
struct __debug_less
|
||||
@@ -688,12 +685,12 @@ struct __debug_less
|
||||
{
|
||||
bool __r = __comp_(__x, __y);
|
||||
if (__r)
|
||||
assert(!__comp_(__y, __x));
|
||||
_LIBCPP_ASSERT(!__comp_(__y, __x), "Comparator does not induce a strict weak ordering");
|
||||
return __r;
|
||||
}
|
||||
};
|
||||
|
||||
#endif // _LIBCPP_DEBUG
|
||||
#endif // _LIBCPP_DEBUG2
|
||||
|
||||
// Precondition: __x != 0
|
||||
inline _LIBCPP_INLINE_VISIBILITY unsigned __ctz(unsigned __x) {return __builtin_ctz (__x);}
|
||||
@@ -3641,14 +3638,14 @@ inline _LIBCPP_INLINE_VISIBILITY
|
||||
void
|
||||
sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp)
|
||||
{
|
||||
#ifdef _LIBCPP_DEBUG
|
||||
#ifdef _LIBCPP_DEBUG2
|
||||
typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref;
|
||||
__debug_less<_Compare> __c(__comp);
|
||||
__sort<_Comp_ref>(__first, __last, __c);
|
||||
#else // _LIBCPP_DEBUG
|
||||
#else // _LIBCPP_DEBUG2
|
||||
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
|
||||
__sort<_Comp_ref>(__first, __last, __comp);
|
||||
#endif // _LIBCPP_DEBUG
|
||||
#endif // _LIBCPP_DEBUG2
|
||||
}
|
||||
|
||||
template <class _RandomAccessIterator>
|
||||
@@ -3675,6 +3672,15 @@ sort(__wrap_iter<_Tp*> __first, __wrap_iter<_Tp*> __last)
|
||||
_VSTD::sort(__first.base(), __last.base());
|
||||
}
|
||||
|
||||
template <class _Tp, class _Compare>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
void
|
||||
sort(__wrap_iter<_Tp*> __first, __wrap_iter<_Tp*> __last, _Compare __comp)
|
||||
{
|
||||
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
|
||||
_VSTD::sort<_Tp*, _Comp_ref>(__first.base(), __last.base(), __comp);
|
||||
}
|
||||
|
||||
extern template void __sort<__less<char>&, char*>(char*, char*, __less<char>&);
|
||||
extern template void __sort<__less<wchar_t>&, wchar_t*>(wchar_t*, wchar_t*, __less<wchar_t>&);
|
||||
extern template void __sort<__less<signed char>&, signed char*>(signed char*, signed char*, __less<signed char>&);
|
||||
@@ -3738,14 +3744,14 @@ inline _LIBCPP_INLINE_VISIBILITY
|
||||
_ForwardIterator
|
||||
lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value, _Compare __comp)
|
||||
{
|
||||
#ifdef _LIBCPP_DEBUG
|
||||
#ifdef _LIBCPP_DEBUG2
|
||||
typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref;
|
||||
__debug_less<_Compare> __c(__comp);
|
||||
return __lower_bound<_Comp_ref>(__first, __last, __value, __c);
|
||||
#else // _LIBCPP_DEBUG
|
||||
#else // _LIBCPP_DEBUG2
|
||||
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
|
||||
return __lower_bound<_Comp_ref>(__first, __last, __value, __comp);
|
||||
#endif // _LIBCPP_DEBUG
|
||||
#endif // _LIBCPP_DEBUG2
|
||||
}
|
||||
|
||||
template <class _ForwardIterator, class _Tp>
|
||||
@@ -3786,14 +3792,14 @@ inline _LIBCPP_INLINE_VISIBILITY
|
||||
_ForwardIterator
|
||||
upper_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value, _Compare __comp)
|
||||
{
|
||||
#ifdef _LIBCPP_DEBUG
|
||||
#ifdef _LIBCPP_DEBUG2
|
||||
typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref;
|
||||
__debug_less<_Compare> __c(__comp);
|
||||
return __upper_bound<_Comp_ref>(__first, __last, __value, __c);
|
||||
#else // _LIBCPP_DEBUG
|
||||
#else // _LIBCPP_DEBUG2
|
||||
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
|
||||
return __upper_bound<_Comp_ref>(__first, __last, __value, __comp);
|
||||
#endif // _LIBCPP_DEBUG
|
||||
#endif // _LIBCPP_DEBUG2
|
||||
}
|
||||
|
||||
template <class _ForwardIterator, class _Tp>
|
||||
@@ -3846,14 +3852,14 @@ inline _LIBCPP_INLINE_VISIBILITY
|
||||
pair<_ForwardIterator, _ForwardIterator>
|
||||
equal_range(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value, _Compare __comp)
|
||||
{
|
||||
#ifdef _LIBCPP_DEBUG
|
||||
#ifdef _LIBCPP_DEBUG2
|
||||
typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref;
|
||||
__debug_less<_Compare> __c(__comp);
|
||||
return __equal_range<_Comp_ref>(__first, __last, __value, __c);
|
||||
#else // _LIBCPP_DEBUG
|
||||
#else // _LIBCPP_DEBUG2
|
||||
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
|
||||
return __equal_range<_Comp_ref>(__first, __last, __value, __comp);
|
||||
#endif // _LIBCPP_DEBUG
|
||||
#endif // _LIBCPP_DEBUG2
|
||||
}
|
||||
|
||||
template <class _ForwardIterator, class _Tp>
|
||||
@@ -3881,14 +3887,14 @@ inline _LIBCPP_INLINE_VISIBILITY
|
||||
bool
|
||||
binary_search(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value, _Compare __comp)
|
||||
{
|
||||
#ifdef _LIBCPP_DEBUG
|
||||
#ifdef _LIBCPP_DEBUG2
|
||||
typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref;
|
||||
__debug_less<_Compare> __c(__comp);
|
||||
return __binary_search<_Comp_ref>(__first, __last, __value, __c);
|
||||
#else // _LIBCPP_DEBUG
|
||||
#else // _LIBCPP_DEBUG2
|
||||
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
|
||||
return __binary_search<_Comp_ref>(__first, __last, __value, __comp);
|
||||
#endif // _LIBCPP_DEBUG
|
||||
#endif // _LIBCPP_DEBUG2
|
||||
}
|
||||
|
||||
template <class _ForwardIterator, class _Tp>
|
||||
@@ -3931,14 +3937,14 @@ _OutputIterator
|
||||
merge(_InputIterator1 __first1, _InputIterator1 __last1,
|
||||
_InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp)
|
||||
{
|
||||
#ifdef _LIBCPP_DEBUG
|
||||
#ifdef _LIBCPP_DEBUG2
|
||||
typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref;
|
||||
__debug_less<_Compare> __c(__comp);
|
||||
return _VSTD::__merge<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __c);
|
||||
#else // _LIBCPP_DEBUG
|
||||
#else // _LIBCPP_DEBUG2
|
||||
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
|
||||
return _VSTD::__merge<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __comp);
|
||||
#endif // _LIBCPP_DEBUG
|
||||
#endif // _LIBCPP_DEBUG2
|
||||
}
|
||||
|
||||
template <class _InputIterator1, class _InputIterator2, class _OutputIterator>
|
||||
@@ -4105,16 +4111,16 @@ inplace_merge(_BidirectionalIterator __first, _BidirectionalIterator __middle, _
|
||||
__buf = _VSTD::get_temporary_buffer<value_type>(__buf_size);
|
||||
__h.reset(__buf.first);
|
||||
}
|
||||
#ifdef _LIBCPP_DEBUG
|
||||
#ifdef _LIBCPP_DEBUG2
|
||||
typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref;
|
||||
__debug_less<_Compare> __c(__comp);
|
||||
return _VSTD::__inplace_merge<_Comp_ref>(__first, __middle, __last, __c, __len1, __len2,
|
||||
__buf.first, __buf.second);
|
||||
#else // _LIBCPP_DEBUG
|
||||
#else // _LIBCPP_DEBUG2
|
||||
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
|
||||
return _VSTD::__inplace_merge<_Comp_ref>(__first, __middle, __last, __comp, __len1, __len2,
|
||||
__buf.first, __buf.second);
|
||||
#endif // _LIBCPP_DEBUG
|
||||
#endif // _LIBCPP_DEBUG2
|
||||
}
|
||||
|
||||
template <class _BidirectionalIterator>
|
||||
@@ -4316,14 +4322,14 @@ stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compar
|
||||
__buf = _VSTD::get_temporary_buffer<value_type>(__len);
|
||||
__h.reset(__buf.first);
|
||||
}
|
||||
#ifdef _LIBCPP_DEBUG
|
||||
#ifdef _LIBCPP_DEBUG2
|
||||
typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref;
|
||||
__debug_less<_Compare> __c(__comp);
|
||||
__stable_sort<_Comp_ref>(__first, __last, __c, __len, __buf.first, __buf.second);
|
||||
#else // _LIBCPP_DEBUG
|
||||
#else // _LIBCPP_DEBUG2
|
||||
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
|
||||
__stable_sort<_Comp_ref>(__first, __last, __comp, __len, __buf.first, __buf.second);
|
||||
#endif // _LIBCPP_DEBUG
|
||||
#endif // _LIBCPP_DEBUG2
|
||||
}
|
||||
|
||||
template <class _RandomAccessIterator>
|
||||
@@ -4465,14 +4471,14 @@ inline _LIBCPP_INLINE_VISIBILITY
|
||||
void
|
||||
push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp)
|
||||
{
|
||||
#ifdef _LIBCPP_DEBUG
|
||||
#ifdef _LIBCPP_DEBUG2
|
||||
typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref;
|
||||
__debug_less<_Compare> __c(__comp);
|
||||
__push_heap_back<_Comp_ref>(__first, __last, __c, __last - __first);
|
||||
#else // _LIBCPP_DEBUG
|
||||
#else // _LIBCPP_DEBUG2
|
||||
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
|
||||
__push_heap_back<_Comp_ref>(__first, __last, __comp, __last - __first);
|
||||
#endif // _LIBCPP_DEBUG
|
||||
#endif // _LIBCPP_DEBUG2
|
||||
}
|
||||
|
||||
template <class _RandomAccessIterator>
|
||||
@@ -4503,14 +4509,14 @@ inline _LIBCPP_INLINE_VISIBILITY
|
||||
void
|
||||
pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp)
|
||||
{
|
||||
#ifdef _LIBCPP_DEBUG
|
||||
#ifdef _LIBCPP_DEBUG2
|
||||
typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref;
|
||||
__debug_less<_Compare> __c(__comp);
|
||||
__pop_heap<_Comp_ref>(__first, __last, __c, __last - __first);
|
||||
#else // _LIBCPP_DEBUG
|
||||
#else // _LIBCPP_DEBUG2
|
||||
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
|
||||
__pop_heap<_Comp_ref>(__first, __last, __comp, __last - __first);
|
||||
#endif // _LIBCPP_DEBUG
|
||||
#endif // _LIBCPP_DEBUG2
|
||||
}
|
||||
|
||||
template <class _RandomAccessIterator>
|
||||
@@ -4543,14 +4549,14 @@ inline _LIBCPP_INLINE_VISIBILITY
|
||||
void
|
||||
make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp)
|
||||
{
|
||||
#ifdef _LIBCPP_DEBUG
|
||||
#ifdef _LIBCPP_DEBUG2
|
||||
typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref;
|
||||
__debug_less<_Compare> __c(__comp);
|
||||
__make_heap<_Comp_ref>(__first, __last, __c);
|
||||
#else // _LIBCPP_DEBUG
|
||||
#else // _LIBCPP_DEBUG2
|
||||
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
|
||||
__make_heap<_Comp_ref>(__first, __last, __comp);
|
||||
#endif // _LIBCPP_DEBUG
|
||||
#endif // _LIBCPP_DEBUG2
|
||||
}
|
||||
|
||||
template <class _RandomAccessIterator>
|
||||
@@ -4577,14 +4583,14 @@ inline _LIBCPP_INLINE_VISIBILITY
|
||||
void
|
||||
sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp)
|
||||
{
|
||||
#ifdef _LIBCPP_DEBUG
|
||||
#ifdef _LIBCPP_DEBUG2
|
||||
typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref;
|
||||
__debug_less<_Compare> __c(__comp);
|
||||
__sort_heap<_Comp_ref>(__first, __last, __c);
|
||||
#else // _LIBCPP_DEBUG
|
||||
#else // _LIBCPP_DEBUG2
|
||||
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
|
||||
__sort_heap<_Comp_ref>(__first, __last, __comp);
|
||||
#endif // _LIBCPP_DEBUG
|
||||
#endif // _LIBCPP_DEBUG2
|
||||
}
|
||||
|
||||
template <class _RandomAccessIterator>
|
||||
@@ -4621,14 +4627,14 @@ void
|
||||
partial_sort(_RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomAccessIterator __last,
|
||||
_Compare __comp)
|
||||
{
|
||||
#ifdef _LIBCPP_DEBUG
|
||||
#ifdef _LIBCPP_DEBUG2
|
||||
typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref;
|
||||
__debug_less<_Compare> __c(__comp);
|
||||
__partial_sort<_Comp_ref>(__first, __middle, __last, __c);
|
||||
#else // _LIBCPP_DEBUG
|
||||
#else // _LIBCPP_DEBUG2
|
||||
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
|
||||
__partial_sort<_Comp_ref>(__first, __middle, __last, __comp);
|
||||
#endif // _LIBCPP_DEBUG
|
||||
#endif // _LIBCPP_DEBUG2
|
||||
}
|
||||
|
||||
template <class _RandomAccessIterator>
|
||||
@@ -4671,14 +4677,14 @@ _RandomAccessIterator
|
||||
partial_sort_copy(_InputIterator __first, _InputIterator __last,
|
||||
_RandomAccessIterator __result_first, _RandomAccessIterator __result_last, _Compare __comp)
|
||||
{
|
||||
#ifdef _LIBCPP_DEBUG
|
||||
#ifdef _LIBCPP_DEBUG2
|
||||
typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref;
|
||||
__debug_less<_Compare> __c(__comp);
|
||||
return __partial_sort_copy<_Comp_ref>(__first, __last, __result_first, __result_last, __c);
|
||||
#else // _LIBCPP_DEBUG
|
||||
#else // _LIBCPP_DEBUG2
|
||||
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
|
||||
return __partial_sort_copy<_Comp_ref>(__first, __last, __result_first, __result_last, __comp);
|
||||
#endif // _LIBCPP_DEBUG
|
||||
#endif // _LIBCPP_DEBUG2
|
||||
}
|
||||
|
||||
template <class _InputIterator, class _RandomAccessIterator>
|
||||
@@ -4883,14 +4889,14 @@ inline _LIBCPP_INLINE_VISIBILITY
|
||||
void
|
||||
nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, _RandomAccessIterator __last, _Compare __comp)
|
||||
{
|
||||
#ifdef _LIBCPP_DEBUG
|
||||
#ifdef _LIBCPP_DEBUG2
|
||||
typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref;
|
||||
__debug_less<_Compare> __c(__comp);
|
||||
__nth_element<_Comp_ref>(__first, __nth, __last, __c);
|
||||
#else // _LIBCPP_DEBUG
|
||||
#else // _LIBCPP_DEBUG2
|
||||
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
|
||||
__nth_element<_Comp_ref>(__first, __nth, __last, __comp);
|
||||
#endif // _LIBCPP_DEBUG
|
||||
#endif // _LIBCPP_DEBUG2
|
||||
}
|
||||
|
||||
template <class _RandomAccessIterator>
|
||||
@@ -4924,14 +4930,14 @@ bool
|
||||
includes(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2,
|
||||
_Compare __comp)
|
||||
{
|
||||
#ifdef _LIBCPP_DEBUG
|
||||
#ifdef _LIBCPP_DEBUG2
|
||||
typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref;
|
||||
__debug_less<_Compare> __c(__comp);
|
||||
return __includes<_Comp_ref>(__first1, __last1, __first2, __last2, __c);
|
||||
#else // _LIBCPP_DEBUG
|
||||
#else // _LIBCPP_DEBUG2
|
||||
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
|
||||
return __includes<_Comp_ref>(__first1, __last1, __first2, __last2, __comp);
|
||||
#endif // _LIBCPP_DEBUG
|
||||
#endif // _LIBCPP_DEBUG2
|
||||
}
|
||||
|
||||
template <class _InputIterator1, class _InputIterator2>
|
||||
@@ -4977,14 +4983,14 @@ _OutputIterator
|
||||
set_union(_InputIterator1 __first1, _InputIterator1 __last1,
|
||||
_InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp)
|
||||
{
|
||||
#ifdef _LIBCPP_DEBUG
|
||||
#ifdef _LIBCPP_DEBUG2
|
||||
typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref;
|
||||
__debug_less<_Compare> __c(__comp);
|
||||
return __set_union<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __c);
|
||||
#else // _LIBCPP_DEBUG
|
||||
#else // _LIBCPP_DEBUG2
|
||||
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
|
||||
return __set_union<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __comp);
|
||||
#endif // _LIBCPP_DEBUG
|
||||
#endif // _LIBCPP_DEBUG2
|
||||
}
|
||||
|
||||
template <class _InputIterator1, class _InputIterator2, class _OutputIterator>
|
||||
@@ -5029,14 +5035,14 @@ _OutputIterator
|
||||
set_intersection(_InputIterator1 __first1, _InputIterator1 __last1,
|
||||
_InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp)
|
||||
{
|
||||
#ifdef _LIBCPP_DEBUG
|
||||
#ifdef _LIBCPP_DEBUG2
|
||||
typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref;
|
||||
__debug_less<_Compare> __c(__comp);
|
||||
return __set_intersection<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __c);
|
||||
#else // _LIBCPP_DEBUG
|
||||
#else // _LIBCPP_DEBUG2
|
||||
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
|
||||
return __set_intersection<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __comp);
|
||||
#endif // _LIBCPP_DEBUG
|
||||
#endif // _LIBCPP_DEBUG2
|
||||
}
|
||||
|
||||
template <class _InputIterator1, class _InputIterator2, class _OutputIterator>
|
||||
@@ -5083,14 +5089,14 @@ _OutputIterator
|
||||
set_difference(_InputIterator1 __first1, _InputIterator1 __last1,
|
||||
_InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp)
|
||||
{
|
||||
#ifdef _LIBCPP_DEBUG
|
||||
#ifdef _LIBCPP_DEBUG2
|
||||
typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref;
|
||||
__debug_less<_Compare> __c(__comp);
|
||||
return __set_difference<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __c);
|
||||
#else // _LIBCPP_DEBUG
|
||||
#else // _LIBCPP_DEBUG2
|
||||
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
|
||||
return __set_difference<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __comp);
|
||||
#endif // _LIBCPP_DEBUG
|
||||
#endif // _LIBCPP_DEBUG2
|
||||
}
|
||||
|
||||
template <class _InputIterator1, class _InputIterator2, class _OutputIterator>
|
||||
@@ -5142,14 +5148,14 @@ _OutputIterator
|
||||
set_symmetric_difference(_InputIterator1 __first1, _InputIterator1 __last1,
|
||||
_InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp)
|
||||
{
|
||||
#ifdef _LIBCPP_DEBUG
|
||||
#ifdef _LIBCPP_DEBUG2
|
||||
typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref;
|
||||
__debug_less<_Compare> __c(__comp);
|
||||
return __set_symmetric_difference<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __c);
|
||||
#else // _LIBCPP_DEBUG
|
||||
#else // _LIBCPP_DEBUG2
|
||||
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
|
||||
return __set_symmetric_difference<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __comp);
|
||||
#endif // _LIBCPP_DEBUG
|
||||
#endif // _LIBCPP_DEBUG2
|
||||
}
|
||||
|
||||
template <class _InputIterator1, class _InputIterator2, class _OutputIterator>
|
||||
@@ -5186,14 +5192,14 @@ bool
|
||||
lexicographical_compare(_InputIterator1 __first1, _InputIterator1 __last1,
|
||||
_InputIterator2 __first2, _InputIterator2 __last2, _Compare __comp)
|
||||
{
|
||||
#ifdef _LIBCPP_DEBUG
|
||||
#ifdef _LIBCPP_DEBUG2
|
||||
typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref;
|
||||
__debug_less<_Compare> __c(__comp);
|
||||
return __lexicographical_compare<_Comp_ref>(__first1, __last1, __first2, __last2, __c);
|
||||
#else // _LIBCPP_DEBUG
|
||||
#else // _LIBCPP_DEBUG2
|
||||
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
|
||||
return __lexicographical_compare<_Comp_ref>(__first1, __last1, __first2, __last2, __comp);
|
||||
#endif // _LIBCPP_DEBUG
|
||||
#endif // _LIBCPP_DEBUG2
|
||||
}
|
||||
|
||||
template <class _InputIterator1, class _InputIterator2>
|
||||
@@ -5241,14 +5247,14 @@ inline _LIBCPP_INLINE_VISIBILITY
|
||||
bool
|
||||
next_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last, _Compare __comp)
|
||||
{
|
||||
#ifdef _LIBCPP_DEBUG
|
||||
#ifdef _LIBCPP_DEBUG2
|
||||
typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref;
|
||||
__debug_less<_Compare> __c(__comp);
|
||||
return __next_permutation<_Comp_ref>(__first, __last, __c);
|
||||
#else // _LIBCPP_DEBUG
|
||||
#else // _LIBCPP_DEBUG2
|
||||
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
|
||||
return __next_permutation<_Comp_ref>(__first, __last, __comp);
|
||||
#endif // _LIBCPP_DEBUG
|
||||
#endif // _LIBCPP_DEBUG2
|
||||
}
|
||||
|
||||
template <class _BidirectionalIterator>
|
||||
@@ -5294,14 +5300,14 @@ inline _LIBCPP_INLINE_VISIBILITY
|
||||
bool
|
||||
prev_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last, _Compare __comp)
|
||||
{
|
||||
#ifdef _LIBCPP_DEBUG
|
||||
#ifdef _LIBCPP_DEBUG2
|
||||
typedef typename add_lvalue_reference<__debug_less<_Compare> >::type _Comp_ref;
|
||||
__debug_less<_Compare> __c(__comp);
|
||||
return __prev_permutation<_Comp_ref>(__first, __last, __c);
|
||||
#else // _LIBCPP_DEBUG
|
||||
#else // _LIBCPP_DEBUG2
|
||||
typedef typename add_lvalue_reference<_Compare>::type _Comp_ref;
|
||||
return __prev_permutation<_Comp_ref>(__first, __last, __comp);
|
||||
#endif // _LIBCPP_DEBUG
|
||||
#endif // _LIBCPP_DEBUG2
|
||||
}
|
||||
|
||||
template <class _BidirectionalIterator>
|
||||
|
||||
Reference in New Issue
Block a user