This commit is contained in:
Isuru Samarathunga
2025-11-03 01:46:13 +05:30
parent 2498e7d6e3
commit cdc44137e8

View File

@ -19,13 +19,14 @@
#include <stdint.h>
#include <stdlib.h>
#include <new>
#include <cstddef>
#include <concepts>
#include <functional>
#include <assert.h>
#include <type_traits>
#include <concepts>
#include <cstddef>
#include <functional>
#include <initializer_list>
#include <new>
#include <sstream>
#include <type_traits>
#define IAC_SEC_LEVEL(v) (IACORE_SECURITY_LEVEL >= v)
@ -112,13 +113,14 @@
#define CAST(v, t) ((t) v)
#define ALIAS_FUNCTION(alias, function) template <typename... Args> \
auto alias(Args&&... args) -> decltype(f(std::forward<Args>(args)...)) \
#define ALIAS_FUNCTION(alias, function) \
template<typename... Args> auto alias(Args &&...args) -> decltype(f(std::forward<Args>(args)...)) \
{ \
return function(std::forward<Args>(args)...); \
}
#define ALIAS_TEMPLATE_FUNCTION(t, alias, function) template <typename t, typename... Args> \
#define ALIAS_TEMPLATE_FUNCTION(t, alias, function) \
template<typename t, typename... Args> \
auto alias(Args &&...args) -> decltype(function<t>(std::forward<Args>(args)...)) \
{ \
return function<t>(std::forward<Args>(args)...); \
@ -150,8 +152,19 @@
#define IA_MAX_STRING_LENGTH (IA_MAX_POSSIBLE_SIZE >> 8)
#define IA_VERSION_TYPE UINT64
#define IA_MAKE_VERSION(major, minor, patch) ((static_cast<UINT64>(major) & 0xFFFFFF) << 40) | ((static_cast<UINT64>(minor) & 0xFFFFFF) << 16) | (static_cast<UINT64>(patch) & 0xFFFF)
#define IA_STRINGIFY_VERSION(version) BuildString("v", (version >> 40) & 0xFFFFFF, ".", (version >> 16) & 0xFFFFFF, ".", version & 0xFFFF)
#define IA_MAKE_VERSION(major, minor, patch) \
((static_cast<UINT64>(major) & 0xFFFFFF) << 40) | ((static_cast<UINT64>(minor) & 0xFFFFFF) << 16) | \
(static_cast<UINT64>(patch) & 0xFFFF)
#define IA_STRINGIFY_VERSION(version) \
BuildString("v", (version >> 40) & 0xFFFFFF, ".", (version >> 16) & 0xFFFFFF, ".", version & 0xFFFF)
#define IA_PARSE_VERSION_STRING(versionString) \
[](IN std::string str) { \
INT32 minor, major, patch; \
char dot; \
std::stringstream ss(str); \
ss >> major >> dot >> minor >> dot >> patch; \
return IA_MAKE_VERSION(major, minor, patch); \
}(versionString)
#if defined(_MSC_VER)
#define IA_DLL_EXPORT __declspec(dllexport)