[libcxx-commits] [libcxx] [libc++] __key_equiv is sometimes 2x expensive (PR #175087)
via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Jan 30 08:56:37 PST 2026
================
@@ -29,9 +29,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>
[[__nodiscard__]] _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 std::pair<_Iter, _Iter>
-__unique(_Iter __first, _Sent __last, _BinaryPredicate&& __pred) {
+__unchecked_unique(_Iter __first, _Sent __last, _BinaryPredicate&& __pred) {
----------------
halbi2 wrote:
@philnik777 I have renamed the function as you asked. Can you merge this improvement please?
https://github.com/llvm/llvm-project/pull/175087
More information about the libcxx-commits
mailing list