|
JH-Toolkit v1.4.1
An engineering-oriented C++20 toolkit with duck-typed concepts, static design, async coroutines, and semantic containers — header-only, RTTI-free, and concurrency-friendly.
|
Base platform checks and macros for all modules. More...
#include <cstddef>Go to the source code of this file.
Base platform checks and macros for all modules.
Enforces 64-bit targets and excludes unsupported compilers (MSVC). Provides compiler, architecture, OS, and endianness detection macros.
This header is implicitly included in most internal components to guard against undefined behavior on unsupported platforms or toolchains.
Macros > constexpr: better and leaner for compilation and branch optimization.
This header defines a minimal and precise set of IS_* macros to identify platform, compiler, architecture, and endianness traits.
IS_LINUX == 1 means target is Linux) These macros are intentionally simple:
This avoids undefined behavior even when included alongside other headers or libraries that define the same macros consistently.
Rule: If another library defines the same IS_XXX macro with the same meaning, it's harmless.