diff --git a/deps/ox/src/ox/std/memory.hpp b/deps/ox/src/ox/std/memory.hpp index ab64d1a44..14ade4030 100644 --- a/deps/ox/src/ox/std/memory.hpp +++ b/deps/ox/src/ox/std/memory.hpp @@ -8,8 +8,33 @@ #pragma once +#if __has_include() + +#include + +#else + +namespace std { + +template +struct allocator { + [[nodiscard]] + constexpr T *allocate(size_t n) { + return static_cast(::operator new(n * sizeof(T))); + } + + constexpr void deallocate(T *p, std::size_t) { + ::operator delete(p); + } +}; + +} + +#endif + #include "utility.hpp" + namespace ox { template