[libcxx-commits] [libcxx] [libc++] Implement P2077R3 Heterogeneous erasure overloads for associative containers (PR #78277)
Hristo Hristov via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Jan 16 21:50:38 PST 2024
================
@@ -1309,6 +1317,12 @@ public:
_LIBCPP_HIDE_FROM_ABI iterator erase(const_iterator __p) { return __tree_.erase(__p.__i_); }
_LIBCPP_HIDE_FROM_ABI iterator erase(iterator __p) { return __tree_.erase(__p.__i_); }
_LIBCPP_HIDE_FROM_ABI size_type erase(const key_type& __k) { return __tree_.__erase_unique(__k); }
+#if _LIBCPP_STD_VER >= 23
+ template <typename _K2, enable_if_t<__is_transparent<_Compare, _K2>::value && !(is_convertible_v<_K2&&, iterator> || is_convertible_v<_K2&&, const_iterator>), int> = 0>
----------------
Zingam wrote:
Why not use concepts instead?
https://github.com/llvm/llvm-project/pull/78277
More information about the libcxx-commits
mailing list