diff options
Diffstat (limited to 'libcxx/include/algorithm')
-rw-r--r-- | libcxx/include/algorithm | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libcxx/include/algorithm b/libcxx/include/algorithm index 22adcc8ed7d..244ae2d5b78 100644 --- a/libcxx/include/algorithm +++ b/libcxx/include/algorithm @@ -785,6 +785,15 @@ struct __debug_less __debug_less(_Compare& __c) : __comp_(__c) {} template <class _Tp, class _Up> + bool operator()(const _Tp& __x, const _Up& __y) + { + bool __r = __comp_(__x, __y); + if (__r) + __do_compare_assert(0, __y, __x); + return __r; + } + + template <class _Tp, class _Up> _LIBCPP_CONSTEXPR_AFTER_CXX17 bool operator()(_Tp& __x, _Up& __y) { |