Skip to content

Commit

Permalink
Add basic_json ctor tests scoped_allocator
Browse files Browse the repository at this point in the history
  • Loading branch information
danielaparker committed Oct 21, 2024
1 parent 82237bd commit 79848b0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions examples/src/free_list_allocator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 79848b0

Please sign in to comment.