From af33fb7171ad94b9ac90eedc9f87b4ef68e29f71 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Wed, 9 Oct 2024 20:32:29 +0200 Subject: [PATCH] only optimize swap for std::alocator --- libcxx/include/string | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libcxx/include/string b/libcxx/include/string index 89953d839abd9a..4de733e83942a4 100644 --- a/libcxx/include/string +++ b/libcxx/include/string @@ -751,7 +751,7 @@ struct __init_with_sentinel_tag {}; template class basic_string memberwise_trivially_relocatable - memberwise_replaceable { + memberwise_replaceable { private: using __default_allocator_type = allocator<_CharT>; @@ -3449,7 +3449,7 @@ inline _LIBCPP_CONSTEXPR_SINCE_CXX20 void basic_string<_CharT, _Traits, _Allocat { #if _LIBCPP_STD_VER >= 26 - if constexpr(__alloc_traits::is_always_equal::value) { + if constexpr(std::is_same_v>) { std::swap_value_representations(*this, __str); return; }