Similar to a std::pmr::polymorphic_allocator.
More...
#include <playrho/pmr/MemoryResource.hpp>
Public Types | |
| using | value_type = T |
| Value type alias. | |
Public Member Functions | |
| polymorphic_allocator (const polymorphic_allocator &)=default | |
| Copy constructor. | |
| template<class U > | |
| polymorphic_allocator (const polymorphic_allocator< U > &other) noexcept | |
| Compatible value type copy constructor. | |
| polymorphic_allocator (ResourceType resource=nullptr) noexcept | |
| Initializing constructor. | |
| T * | allocate (std::size_t n) |
Allocates buffer for array of n elements. | |
| void | deallocate (T *p, std::size_t n) noexcept |
Deallocates buffer p of array of n elements. | |
| polymorphic_allocator & | operator= (const polymorphic_allocator &)=delete |
| Copy assignment is explicitly deleted. | |
| ResourceType | resource () const noexcept |
| Gets the resource property of this instance. | |
Friends | |
| bool | operator!= (const polymorphic_allocator &lhs, const polymorphic_allocator &rhs) noexcept |
| Inequality support. | |
| bool | operator== (const polymorphic_allocator &lhs, const polymorphic_allocator &rhs) noexcept |
| Equality support. | |
Similar to a std::pmr::polymorphic_allocator.
std::pmr (like pre LLVM 16 and Apple Clang).