From da23c9304d832bc0908c6b50eef84776329e252d 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/ox/src/ox/model/def.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/deps/ox/src/ox/model/def.hpp b/deps/ox/src/ox/model/def.hpp index 7e131e0d..f4f042fd 100644 --- a/deps/ox/src/ox/model/def.hpp +++ b/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