diff --git a/deps/ox/src/ox/std/iterator.hpp b/deps/ox/src/ox/std/iterator.hpp index 538f73977..ffeca0226 100644 --- a/deps/ox/src/ox/std/iterator.hpp +++ b/deps/ox/src/ox/std/iterator.hpp @@ -9,7 +9,7 @@ #pragma once #ifndef OX_USE_STDLIB -#include "types.hpp" +#include "stddef.hpp" namespace std { diff --git a/deps/ox/src/ox/std/stddef.hpp b/deps/ox/src/ox/std/stddef.hpp index 149554e7b..21ea3d5ee 100644 --- a/deps/ox/src/ox/std/stddef.hpp +++ b/deps/ox/src/ox/std/stddef.hpp @@ -8,10 +8,16 @@ #pragma once +#include "types.hpp" + #ifdef OX_USE_STDLIB #include #else #define offsetof(type, member) __builtin_offsetof(type, member) + +namespace std { +using ptrdiff_t = uintptr_t; +} #endif #ifdef _MSC_VER diff --git a/deps/ox/src/ox/std/types.hpp b/deps/ox/src/ox/std/types.hpp index e17632220..9cb5ddf15 100644 --- a/deps/ox/src/ox/std/types.hpp +++ b/deps/ox/src/ox/std/types.hpp @@ -160,10 +160,4 @@ static_assert(sizeof(uint8_t) == 1, "uint8_t is wrong size"); static_assert(sizeof(uint16_t) == 2, "uint16_t is wrong size"); static_assert(sizeof(uint32_t) == 4, "uint32_t is wrong size"); static_assert(sizeof(uint64_t) == 8, "uint64_t is wrong size"); -static_assert(sizeof(uintptr_t) == sizeof(void*), "uintptr_t is wrong size"); - -#ifndef OX_USE_STDLIB -namespace std { -using ptrdiff_t = uintptr_t; -} -#endif \ No newline at end of file +static_assert(sizeof(uintptr_t) == sizeof(void*), "uintptr_t is wrong size"); \ No newline at end of file