From d311316f24b1522aae9b48a89166eb47b527bfd8 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Tue, 17 Sep 2024 23:49:04 -0500 Subject: [PATCH] [ox/std] Add oxModelFwdDecl macro for broken Apple Clang --- deps/nostalgia/deps/ox/src/ox/model/def.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/deps/nostalgia/deps/ox/src/ox/model/def.hpp b/deps/nostalgia/deps/ox/src/ox/model/def.hpp index 7e131e0..f4f042f 100644 --- a/deps/nostalgia/deps/ox/src/ox/model/def.hpp +++ b/deps/nostalgia/deps/ox/src/ox/model/def.hpp @@ -10,8 +10,10 @@ #include +// oxModelFwdDecl is necessary because Apple-Clang is broken... +#define oxModelFwdDecl(modelName) constexpr ox::Error model(auto *io, ox::CommonPtrWith auto *o) noexcept #define oxModelBegin(modelName) constexpr ox::Error model(auto *io, [[maybe_unused]] ox::CommonPtrWith auto *o) noexcept { oxReturnError(io->template setTypeInfo()); #define oxModelEnd() return OxError(0); } #define oxModelField(fieldName) oxReturnError(io->field(#fieldName, &o->fieldName)); #define oxModelFieldRename(objFieldName, serFieldName) oxReturnError(io->field(#serFieldName, &o->objFieldName)); -#define oxModelFriend(modelName) friend constexpr ox::Error model(auto*, ox::CommonPtrWith auto*) noexcept +#define oxModelFriend(modelName) friend constexpr ox::Error model(auto *io, ox::CommonPtrWith auto *o) noexcept