================ @@ -53,10 +53,9 @@ struct __debug_less { _LIBCPP_CONSTEXPR_SINCE_CXX14 inline _LIBCPP_HIDE_FROM_ABI void __do_compare_assert(long, _LHS&, _RHS&) {} }; -// Pass the comparator by lvalue reference. Or in debug mode, using a -// debugging wrapper that stores a reference. -#if _LIBCPP_HARDENING_MODE == _LIBCPP_HARDENING_MODE_DEBUG -template <class _Comp> +// Pass the comparator by lvalue reference. Or in the extensive hardening mode and above, using a debugging wrapper that +// stores a reference. +#if _LIBCPP_HARDENING_MODE == _LIBCPP_HARDENING_MODE_EXTENSIVE || _LIBCPP_HARDENING_MODE == _LIBCPP_HARDENING_MODE_DEBUG ---------------- ldionne wrote:
Per @danlark1 's comment, I suggest we start by keeping this in the debug mode only. This is also the status quo, so it's more conservative. https://github.com/llvm/llvm-project/pull/77405 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits