Skip to content

Commit

Permalink
Merge pull request #42 from mclow/cleanup.2
Browse files Browse the repository at this point in the history
Cleanups I missed before
  • Loading branch information
cor3ntin authored Oct 9, 2024
2 parents 770954e + 21a4b6f commit 80b832e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion libcxx/include/__memory/uninitialized_algorithms.h
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/__utility/swap.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 80b832e

Please sign in to comment.