diff options
Diffstat (limited to 'src/DI/allocation.tpp')
-rw-r--r-- | src/DI/allocation.tpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/DI/allocation.tpp b/src/DI/allocation.tpp new file mode 100644 index 0000000..245ce99 --- /dev/null +++ b/src/DI/allocation.tpp @@ -0,0 +1,16 @@ +#pragma once + +#include "allocation.hpp" + +template <class Allocator> +AllocDestructor<Allocator>::AllocDestructor(Allocator &allocator, + Size alloc_size) noexcept + : _allocator(allocator), _size(alloc_size) +{ +} + +template <class Allocator> +void AllocDestructor<Allocator>::operator()(Pointer ptr) noexcept +{ + _alloc_traits::deallocate(_allocator, ptr, _size); +} |