From 8f6897225ac937f2897e4f722bbb0157f473d03a Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Mon, 2 Aug 2021 21:47:45 -0500 Subject: [PATCH] [ox/std] Fix ptrdiff_t header location --- deps/ox/src/ox/std/iterator.hpp | 2 +- deps/ox/src/ox/std/stddef.hpp | 6 ++++++ deps/ox/src/ox/std/types.hpp | 8 +------- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/deps/ox/src/ox/std/iterator.hpp b/deps/ox/src/ox/std/iterator.hpp index 538f7397..ffeca022 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 149554e7..21ea3d5e 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 e1763222..9cb5ddf1 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