In libc++, checking specific _LIBCPP_DEBUG_LEVEL levels is used everywhere except in comp_ref_type.h. _LIBCPP_DEBUG is meant as a user-facing option, and internally libc++ should be checking the value of _LIBCPP_DEBUG_LEVEL.
The definition of std::__debug_less doesn't need to be hidden behind the macro, we can unconditionally expose it. It will be unused by __comp_ref_type unless debug mode is enabled.
This was suggested in D118940.