[libcxx-commits] [PATCH] D109011: [libc++] [P0919] Some belated review on D87171

Ruslan Arutyunyan via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Aug 31 12:30:02 PDT 2021


rarutyun added inline comments.


================
Comment at: libcxx/include/map:548
     _LIBCPP_INLINE_VISIBILITY
-    typename enable_if<__is_transparent<_Compare, _K2>::value, bool>::type
-    operator () ( const _K2& __x, const _CP& __y ) const
----------------
ldionne wrote:
> I think those `enable_if`s are important. Otherwise, if a non-transparent comparator is used with arguments that would trigger a conversion if one of the overloads above were used, it would be possible to observe the fact that a conversion is not being performed. Am I misunderstanding?
I have the same understanding. We might end up with breaking change (if I am not mistaken) when Comparator is not transparent and the `key_type` and `K` are not comparable


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109011/new/

https://reviews.llvm.org/D109011



More information about the libcxx-commits mailing list