[libcxx-commits] [PATCH] D118940: [libc++] Fix std::__debug_less in c++17.
Nikolas Klauser via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Feb 3 13:52:19 PST 2022
philnik added inline comments.
================
Comment at: libcxx/include/__algorithm/comp_ref_type.h:51
template <class _LHS, class _RHS>
- _LIBCPP_CONSTEXPR_AFTER_CXX17
- inline _LIBCPP_INLINE_VISIBILITY
- decltype((void)declval<_Compare&>()(
- declval<_LHS &>(), declval<_RHS &>()))
- __do_compare_assert(int, _LHS & __l, _RHS & __r) {
- _LIBCPP_ASSERT(!__comp_(__l, __r),
- "Comparator does not induce a strict weak ordering");
+ _LIBCPP_CONSTEXPR_AFTER_CXX11 inline _LIBCPP_HIDE_FROM_ABI decltype((void)declval<_Compare&>()(declval<_LHS&>(),
+ declval<_RHS&>()))
----------------
rupprecht wrote:
> FYI, this change doesn't look very pleasant, but the clang-format test on libcxx CI was failing, and clang-format does this.
The clang-format check isn't a hard error, you can (and should) revert that part.
================
Comment at: libcxx/include/__algorithm/comp_ref_type.h:25
#ifdef _LIBCPP_DEBUG
----------------
rupprecht wrote:
> philnik wrote:
> > Pre-existing: This should be `_LIBCPP_DEBUG_LEVEL == 1`.
> IIUC, `_LIBCPP_DEBUG_LEVEL=2` should provide a superset of `_LIBCPP_DEBUG_LEVEL=1`: https://github.com/llvm/llvm-project/blob/c3c1c5c6953fcf9320a0cae5121ce55839169790/libcxx/include/__config#L907
>
> Did you want `#if _LIBCPP_DEBUG_LEVEL >= 1`?
Oh sorry, that is what I meant.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118940/new/
https://reviews.llvm.org/D118940
More information about the libcxx-commits
mailing list