diff options
Diffstat (limited to 'src/handle-pool.hpp')
-rw-r--r-- | src/handle-pool.hpp | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/src/handle-pool.hpp b/src/handle-pool.hpp deleted file mode 100644 index 2721f094..00000000 --- a/src/handle-pool.hpp +++ /dev/null @@ -1,34 +0,0 @@ -#pragma once -#include "compat/defs.hpp" -#include <cr/Array.h> -#include <cr/Pointer.h> - -namespace floormat::impl_handle { - -template<typename Obj, uint32_t PageSize> -class Pool -{ - friend class impl_handle<Obj, PageSize>; - - static Pointer<Pool<Obj, PageSize>> make_pool(); - static Page<Obj, PageSize>& find_page(); - - Array<Pointer<Page<Obj, PageSize>>> pages; - size_t next_page_offset = 0; - - static Pointer<Pool<Obj, PageSize>> pool = make_pool(); - -public: - fm_DECLARE_DELETED_COPY_MOVE_ASSIGNMENTS(Pool); - - explicit Pool(); - ~Pool() noexcept; - - template<typename... Xs> - requires requires (Xs&&... xs) { - Obj{forward<Xs>(xs)...}; - } - static impl_handle<Obj, PageSize> make_object(Xs&&... xs); -}; - -} // namespace floormat::impl_handle |