37 template <
class TValueType>
42 using value_type = TValueType;
44 using pointer = TValueType*;
46 using difference_type =
typename std::pointer_traits<pointer>::difference_type;
48 using size_type = std::make_unsigned_t<difference_type>;
50 using propagate_on_container_copy_assignment = std::true_type;
52 using propagate_on_container_move_assignment = std::true_type;
54 using propagate_on_container_swap = std::true_type;
56 using is_always_equal = std::true_type;
66 template <
class TAllocatorType>
75 template <
class... Args>
76 void construct(TValueType* p, Args&& ... args) {
77 *p = TValueType(std::forward<Args...>(args...));
80 void destroy(TValueType* ) {
84 size_type max_size() {
88 TValueType* allocate(
size_t) {
89 return static_cast<TValueType*
>(mValues.data());
92 void deallocate(TValueType*,
size_t) {
98 static constexpr
size_t mSizeBytes = 1 << 10;
100 static constexpr
size_t mSizeElements = mSizeBytes /
sizeof(TValueType);
102 std::array<TValueType, mSizeElements> mValues;
105 template <
class TValueType>
110 template <
class TValueType>
Definition: AllocatorStack.h:38