From f0cccbe3285c039553e1fd8b5a5c7830d6087974 Mon Sep 17 00:00:00 2001 From: Steven Le Rouzic Date: Thu, 6 Mar 2025 22:56:56 +0100 Subject: Replace ASL_MOVE, ASL_FWD, and ASL_FWD_LIKE by their std:: equivalent This is because some compiler stuff and diagnostics tools rely on those symboles being what they are. --- asl/memory/allocator.hpp | 4 ++-- asl/memory/memory.hpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'asl/memory') diff --git a/asl/memory/allocator.hpp b/asl/memory/allocator.hpp index 1628a8a..bb6b992 100644 --- a/asl/memory/allocator.hpp +++ b/asl/memory/allocator.hpp @@ -37,7 +37,7 @@ template T* alloc_new(allocator auto& a, auto&&... args) { void* ptr = a.alloc(layout::of()); - return construct_at(ptr, ASL_FWD(args)...); + return construct_at(ptr, std::forward(args)...); } template @@ -50,7 +50,7 @@ void alloc_delete(allocator auto& a, T* ptr) template constexpr T* alloc_new_default(auto&&... args) { - return alloc_new(DefaultAllocator{}, ASL_FWD(args)...); + return alloc_new(DefaultAllocator{}, std::forward(args)...); } template diff --git a/asl/memory/memory.hpp b/asl/memory/memory.hpp index bf4e125..96ab562 100644 --- a/asl/memory/memory.hpp +++ b/asl/memory/memory.hpp @@ -41,7 +41,7 @@ template constexpr T* construct_at(void* ptr, Args&&... args) requires constructible_from { - return new (ptr) T{ ASL_FWD(args)... }; + return new (ptr) T{ std::forward(args)... }; // NOLINT(*-owning-memory) } template @@ -112,7 +112,7 @@ constexpr void relocate_uninit_n(T* to, T* from, isize_t n) for (isize_t i = 0; i < n; ++i) { // NOLINTNEXTLINE(*-pointer-arithmetic) - construct_at(to + i, ASL_MOVE(from[i])); + construct_at(to + i, std::move(from[i])); } destroy_n(from, n); } @@ -131,7 +131,7 @@ constexpr void relocate_assign_n(T* to, T* from, isize_t n) for (isize_t i = 0; i < n; ++i) { // NOLINTNEXTLINE(*-pointer-arithmetic) - to[i] = ASL_MOVE(from[i]); + to[i] = std::move(from[i]); } destroy_n(from, n); } -- cgit