From 21a4b6fdc09dd8809fe2ac5125f7cb63fd7dd47c Mon Sep 17 00:00:00 2001 From: Marshall Clow Date: Tue, 8 Oct 2024 09:31:35 -0700 Subject: [PATCH] Cleanups I missed before --- libcxx/include/__memory/uninitialized_algorithms.h | 2 +- libcxx/include/__utility/swap.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libcxx/include/__memory/uninitialized_algorithms.h b/libcxx/include/__memory/uninitialized_algorithms.h index 4cf70a0feca5f3..d64226056781eb 100644 --- a/libcxx/include/__memory/uninitialized_algorithms.h +++ b/libcxx/include/__memory/uninitialized_algorithms.h @@ -690,7 +690,7 @@ __uninitialized_allocator_relocate(_Alloc& __alloc, _Tp* __first, _Tp* __last, _ static_assert(__is_cpp17_move_insertable<_Alloc>::value, "The specified type does not meet the requirements of Cpp17MoveInsertable"); -#if _LIBCPP_STD_VER >= 20 +#if _LIBCPP_STD_VER >= 26 if (!__libcpp_is_constant_evaluated()) { if constexpr (is_trivially_relocatable_v<_Tp> || is_nothrow_move_constructible_v<_Tp>) { (void) relocate(__first, __last, const_cast<__remove_const_t<_Tp>*>(__result)); diff --git a/libcxx/include/__utility/swap.h b/libcxx/include/__utility/swap.h index 647da12bfed2d9..f18dc5cb96c8c3 100644 --- a/libcxx/include/__utility/swap.h +++ b/libcxx/include/__utility/swap.h @@ -62,7 +62,7 @@ void swap_value_representations(_Tp& __a, _Tp& __b) { // TODO: research better memswap algorithms char __buffer[__size]; if constexpr (__chunk) { - for (std::size_t __n = 0; n < __chunk; __n++, __aptr += __size, __bptr += __size) { + for (std::size_t __n = 0; __n < __chunk; __n++, __aptr += __size, __bptr += __size) { __builtin_memcpy(__buffer, __aptr, __size); __builtin_memmove(__aptr, __bptr, __size); __builtin_memmove(__bptr, __buffer, __size);