From 536e10d12922104456dcb674b3ccad27da674133 Mon Sep 17 00:00:00 2001 From: dev0 Date: Sun, 23 Nov 2025 14:18:04 +0530 Subject: [PATCH] Fixes --- Src/IACore/inc/IACore/PCH.hpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Src/IACore/inc/IACore/PCH.hpp b/Src/IACore/inc/IACore/PCH.hpp index af89d51..513dde5 100644 --- a/Src/IACore/inc/IACore/PCH.hpp +++ b/Src/IACore/inc/IACore/PCH.hpp @@ -220,12 +220,11 @@ // Templates and Aliases #ifdef __cplusplus -#define ALIAS_FUNCTION(alias, function) \ - template \ - auto alias(Args &&...args) -> decltype(function(std::forward(args)...)) \ - { \ - return function(std::forward(args)...); \ - } +# define ALIAS_FUNCTION(alias, function) \ + template auto alias(Args &&...args) -> decltype(function(std::forward(args)...)) \ + { \ + return function(std::forward(args)...); \ + } # define ALIAS_TEMPLATE_FUNCTION(t, alias, function) \ template \ @@ -271,6 +270,10 @@ #define IA_CONCAT(x, y) IA_CONCAT_IMPL(x, y) #define IA_UNIQUE_NAME(prefix) IA_CONCAT(prefix, __LINE__) +#define ENSURE_BINARY_COMPATIBILITY(A, B) \ + static_assert(sizeof(A) == sizeof(B), \ + #A ", " #B " size mismatch! Do not add virtual functions or new member variables."); + // ----------------------------------------------------------------------------- // Limits & Versioning // -----------------------------------------------------------------------------