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/types/box.hpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'asl/types/box.hpp') diff --git a/asl/types/box.hpp b/asl/types/box.hpp index 4b6e0b3..6501e3e 100644 --- a/asl/types/box.hpp +++ b/asl/types/box.hpp @@ -29,21 +29,21 @@ public: constexpr box(T* ptr, Allocator alloc) : m_ptr{ptr} - , m_alloc{ASL_MOVE(alloc)} + , m_alloc{std::move(alloc)} { ASL_ASSERT(m_ptr != nullptr); } constexpr box(box&& other) : m_ptr{exchange(other.m_ptr, nullptr)} - , m_alloc{ASL_MOVE(other.m_alloc)} + , m_alloc{std::move(other.m_alloc)} {} template requires convertible_from - constexpr box(box&& other) // NOLINT(*-explicit-conversions) + constexpr box(box&& other) // NOLINT(*explicit*,*-not-moved) : m_ptr{exchange(other.m_ptr, nullptr)} - , m_alloc{ASL_MOVE(other.m_alloc)} + , m_alloc{std::move(other.m_alloc)} {} constexpr box& operator=(box&& other) @@ -53,7 +53,7 @@ public: if (m_ptr != nullptr) { reset(); } m_ptr = exchange(other.m_ptr, nullptr); - m_alloc = ASL_MOVE(other.m_alloc); + m_alloc = std::move(other.m_alloc); return *this; } @@ -99,7 +99,7 @@ public: requires hashable friend H AslHashValue(H h, const box& b) { - return H::combine(ASL_MOVE(h), *b); + return H::combine(std::move(h), *b); } template @@ -114,8 +114,8 @@ constexpr box make_box_in(Allocator allocator, Args&&... args) requires constructible_from { void* raw_ptr = allocator.alloc(layout::of()); - auto* ptr = construct_at(raw_ptr, ASL_FWD(args)...); - return box(ptr, ASL_MOVE(allocator)); + auto* ptr = construct_at(raw_ptr, std::forward(args)...); + return box(ptr, std::move(allocator)); } template @@ -124,14 +124,14 @@ constexpr box make_box(Args&&... args) { Allocator allocator{}; void* raw_ptr = allocator.alloc(layout::of()); - auto* ptr = construct_at(raw_ptr, ASL_FWD(args)...); - return box(ptr, ASL_MOVE(allocator)); + auto* ptr = construct_at(raw_ptr, std::forward(args)...); + return box(ptr, std::move(allocator)); } template constexpr T* leak(box&& b) { - return exchange(b.m_ptr, nullptr); + return exchange(std::move(b).m_ptr, nullptr); } } // namespace asl -- cgit