29 #ifndef BIT_MEMORY_BLOCK_ALLOCATORS_BLOCK_ALLOCATOR_REFERENCE_HPP 30 #define BIT_MEMORY_BLOCK_ALLOCATORS_BLOCK_ALLOCATOR_REFERENCE_HPP 32 #if defined(_MSC_VER) && (_MSC_VER >= 1200) 34 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 36 #include "../utilities/owner.hpp" 37 #include "../utilities/allocator_info.hpp" 38 #include "../utilities/memory_block.hpp" 39 #include "../utilities/macros.hpp" 41 #include "../concepts/BlockAllocator.hpp" 42 #include "../concepts/Stateless.hpp" 44 #include "../traits/block_allocator_traits.hpp" 47 #include <type_traits> 53 struct block_allocator_reference_vtable;
76 template<
typename BlockAllocator,
77 typename = std::enable_if_t<is_block_allocator<BlockAllocator>::value &&
78 !std::is_same<block_allocator_reference,BlockAllocator>::value>>
113 owner<memory_block> allocate_block();
118 void deallocate_block( owner<memory_block> block );
133 std::size_t next_block_size()
const noexcept;
140 using vtable_type = detail::block_allocator_reference_vtable;
142 template<
typename Allocator>
143 struct stateless_type;
155 template<
typename BlockAllocator>
164 const vtable_type* m_vtable;
182 template<
typename StatelessBlockAllocator>
188 #include "detail/block_allocator_reference.inl" A type erased view of allocators that satisfy the BlockAllocator concept.
This type is used to hold the generic information for a given allocator.