[libcxx-commits] [libcxx] [libc++] __key_equiv is sometimes 2x expensive (PR #175087)

via libcxx-commits libcxx-commits at lists.llvm.org
Sat Jan 10 08:12:22 PST 2026


================
@@ -28,9 +28,10 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 
 // unique
 
+// For this unchecked algorithm, __pred does not need to be an equivalence relation.
 template <class _AlgPolicy, class _Iter, class _Sent, class _BinaryPredicate>
 _LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI std::pair<_Iter, _Iter>
-__unique(_Iter __first, _Sent __last, _BinaryPredicate&& __pred) {
+__unchecked_unique(_Iter __first, _Sent __last, _BinaryPredicate&& __pred) {
----------------
huixie90 wrote:

i think we shouldn't change the cxx03 headers

https://github.com/llvm/llvm-project/pull/175087


More information about the libcxx-commits mailing list