#pragma once #include <std/fwd/allocator.hpp> #include <euler/heap.hpp> namespace std { template <class T> struct allocator { using value_type = T; constexpr allocator() noexcept {} constexpr allocator(const allocator &other) noexcept {} template <class U> constexpr allocator(const allocator<U> &other) noexcept {} constexpr ~allocator() {} constexpr T *allocate(size_t n) { return (T *)euler::heap::get_block(n * sizeof(T)); } constexpr void deallocate(T *p, size_t n) { euler::heap::return_block(p, n * sizeof(T)); } }; }