diff --git a/libcxx/include/__algorithm/comp_ref_type.h b/libcxx/include/__algorithm/comp_ref_type.h --- a/libcxx/include/__algorithm/comp_ref_type.h +++ b/libcxx/include/__algorithm/comp_ref_type.h @@ -10,11 +10,8 @@ #define _LIBCPP___ALGORITHM_COMP_REF_TYPE_H #include <__config> - -#ifdef _LIBCPP_DEBUG -# include <__debug> -# include <__utility/declval.h> -#endif +#include <__debug> +#include <__utility/declval.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header @@ -22,8 +19,6 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#ifdef _LIBCPP_DEBUG - template struct __debug_less { @@ -59,6 +54,8 @@ __do_compare_assert(int, _LHS & __l, _RHS & __r) { _LIBCPP_ASSERT(!__comp_(__l, __r), "Comparator does not induce a strict weak ordering"); + (void)__l; + (void)__r; } template @@ -67,13 +64,11 @@ void __do_compare_assert(long, _LHS &, _RHS &) {} }; -#endif // _LIBCPP_DEBUG - template struct __comp_ref_type { // Pass the comparator by lvalue reference. Or in debug mode, using a // debugging wrapper that stores a reference. -#ifndef _LIBCPP_DEBUG +#if _LIBCPP_DEBUG_LEVEL == 0 typedef _Comp& type; #else typedef __debug_less<_Comp> type;