1 #ifndef MEMORY_RESOURCE_HPP 2 #define MEMORY_RESOURCE_HPP 9 enum class byte : unsigned char {};
16 void*
allocate(
size_t bytes) {
return do_allocate(bytes); }
17 void deallocate(
void* p,
size_t bytes) {
return do_deallocate(p, bytes); }
25 return do_is_equal(other);
29 virtual void* do_allocate(
size_t bytes) = 0;
30 virtual void do_deallocate(
void* p,
size_t bytes) = 0;
31 virtual bool do_is_equal(
const memory_resource& other)
const noexcept = 0;
48 #endif // MEMORY_RESOURCE_HPP bool is_equal(const memory_resource &other) const noexcept
Definition: memory_resource.hpp:24
Definition: adapter_base.hpp:12
bool operator!=(allocator< T1 > const &a, allocator< T2 > const &b)
Definition: memory_resource.hpp:12
byte
Definition: memory_resource.hpp:9
void deallocate(void *p, size_t bytes)
Definition: memory_resource.hpp:17
bool operator==(allocator< T1 > const &a, allocator< T2 > const &b)
void * allocate(size_t bytes)
Definition: memory_resource.hpp:16