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 // -----------------------------------------------------------------------------