From 79848b0941c1408defdb043ce5934c214060036b Mon Sep 17 00:00:00 2001 From: Daniel Parker Date: Mon, 21 Oct 2024 13:36:50 -0400 Subject: [PATCH] Add basic_json ctor tests scoped_allocator --- examples/src/free_list_allocator.hpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/examples/src/free_list_allocator.hpp b/examples/src/free_list_allocator.hpp index 9f731c4de..9bd5b9424 100644 --- a/examples/src/free_list_allocator.hpp +++ b/examples/src/free_list_allocator.hpp @@ -50,6 +50,15 @@ class free_list_allocator { free_list_allocator& operator = (const free_list_allocator& other) = delete; + free_list_allocator& operator = (free_list_allocator&& other) noexcept { + clear(); + id_ = other.id_; + list = other.list; + other.id_ = -1; + other.list = nullptr; + return *this; + } + ~free_list_allocator() noexcept { clear(); } int id() const noexcept