Refureku v2.2.0
C++17 runtime reflection library.
Allocator.h
1
8#pragma once
9
10#include <cstddef> //std::size_t, std::ptrdiff_t
11#include <new> //operator new, align_val_t
12
13#include "Refureku/Config.h"
14
15namespace rfk
16{
17 template <typename T>
19 {
20 public:
21 using value_type = T;
22 using pointer = T*;
23 using const_pointer = T const*;
24 using reference = T&;
25 using const_reference = T const&;
26
34 RFK_NODISCARD constexpr T* allocate(std::size_t count);
35
42 constexpr void deallocate(T* allocatedMemory,
43 std::size_t count);
44 };
45
46 #include "Refureku/Containers/Allocator.inl"
47}
Definition: Allocator.h:19
RFK_NODISCARD constexpr T * allocate(std::size_t count)
Allocate count * sizeof(T) bytes.
constexpr void deallocate(T *allocatedMemory, std::size_t count)
Deallocate count * sizeof(T) bytes at the specified memory.
Definition: Allocator.h:16