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

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Aug 31 12:06:50 PDT 2021


ldionne requested changes to this revision.
ldionne added inline comments.
This revision now requires changes to proceed.


================
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
----------------
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?


================
Comment at: libcxx/test/std/containers/unord/unord.map/equal_range.transparent.pass.cpp:19
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 
 #include <unordered_map>
----------------
Why is this test named `libcxx/test/std/containers/unord/unord.map/equal_range.transparent.pass.cpp` since we seem to be testing both transparent and non-transparent comparators in it?


================
Comment at: libcxx/test/std/containers/unord/unord.map/equal_range_const.transparent.pass.cpp:1
-//===----------------------------------------------------------------------===//
-//
----------------
I'm a bit confused - where did these tests go?


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