sparrow 0.3.0
Loading...
Searching...
No Matches
sparrow::allocator Concept Reference

#include <allocator.hpp>

Concept definition

template<class T>
concept sparrow::allocator = std::copy_constructible<std::remove_cvref_t<T>>
and std::move_constructible<std::remove_cvref_t<T>>
and std::equality_comparable<std::remove_cvref_t<T>>
and requires(
std::remove_cvref_t<T>& alloc,
typename std::remove_cvref_t<T>::value_type* p,
std::size_t n
) {
typename std::remove_cvref_t<T>::value_type;
{
alloc.allocate(n)
} -> std::same_as<typename std::remove_cvref_t<T>::value_type*>;
{ alloc.deallocate(p, n) } -> std::same_as<void>;
}

Detailed Description

Definition at line 32 of file allocator.hpp.