Zen C++ Libraries
Zero-dependency re-usable components for C++
Loading...
Searching...
No Matches
DynamicAllocator Concept Reference

#include <alloc.hpp>

Concept definition

template<typename T>
concept DynamicAllocator = requires (
T& t,
std::size_t size,
std::size_t alignment,
destroy_fn destroy
) {
{ t.allocate(size, alignment, destroy) } -> std::same_as<void*>;
}
void(*)(void *) destroy_fn
Definition alloc.hpp:53
Definition alloc.hpp:62

Detailed Description

The concept of all allocators that can allocate dynamic objects.

This type of allocators must keep track of destructors because the type is not known upfront.

See also
construct