Fixes
This commit is contained in:
@ -220,12 +220,11 @@
|
|||||||
|
|
||||||
// Templates and Aliases
|
// Templates and Aliases
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
#define ALIAS_FUNCTION(alias, function) \
|
# define ALIAS_FUNCTION(alias, function) \
|
||||||
template<typename... Args> \
|
template<typename... Args> auto alias(Args &&...args) -> decltype(function(std::forward<Args>(args)...)) \
|
||||||
auto alias(Args &&...args) -> decltype(function(std::forward<Args>(args)...)) \
|
{ \
|
||||||
{ \
|
return function(std::forward<Args>(args)...); \
|
||||||
return function(std::forward<Args>(args)...); \
|
}
|
||||||
}
|
|
||||||
|
|
||||||
# define ALIAS_TEMPLATE_FUNCTION(t, alias, function) \
|
# define ALIAS_TEMPLATE_FUNCTION(t, alias, function) \
|
||||||
template<typename t, typename... Args> \
|
template<typename t, typename... Args> \
|
||||||
@ -271,6 +270,10 @@
|
|||||||
#define IA_CONCAT(x, y) IA_CONCAT_IMPL(x, y)
|
#define IA_CONCAT(x, y) IA_CONCAT_IMPL(x, y)
|
||||||
#define IA_UNIQUE_NAME(prefix) IA_CONCAT(prefix, __LINE__)
|
#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
|
// Limits & Versioning
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user