diff --git a/include/bitcoin/system/allocator.hpp b/include/bitcoin/system/allocator.hpp index ca6008ccd1..cd0a23786a 100644 --- a/include/bitcoin/system/allocator.hpp +++ b/include/bitcoin/system/allocator.hpp @@ -103,15 +103,11 @@ class allocator NODISCARD ALLOCATOR Value* allocate(size_t count) THROWS { - ////const auto bytes = get_byte_size(count); - ////return static_cast(arena_->allocate(bytes, alignof(Value))); return allocate_object(count); } void deallocate(Value* ptr, size_t count) NOEXCEPT { - ////// No need to verify multiplication overflow. - ////arena_->deallocate(ptr, count * sizeof(Value), alignof(Value)); return deallocate_object(ptr, count); } @@ -119,13 +115,6 @@ class allocator /// ----------------------------------------------------------------------- /// These allocate & construct / destruct & deallocate. - ////template - ////NODISCARD ALLOCATOR Type* new_object() - ////{ - //// // Default construction fill is bypassed here. - //// return allocate_object(); - ////} - template NODISCARD ALLOCATOR Type* new_object(Args&&... args) THROWS { @@ -148,21 +137,10 @@ class allocator /// ----------------------------------------------------------------------- /// These neither allocate nor deallocate. - ////template - ////void construct(Type*) NOEXCEPT - ////{ - //// // Default construction fill is bypassed here. - ////} - template void construct(Type* ptr, Args&&... arguments) THROWS { - ////if constexpr (!std::is_trivially_constructible_v) - ////{ - ////} - auto at = const_cast(static_cast(ptr)); - std::apply ( // std::apply forwards second argument (tuple) as args to lambda.