|
Common System 0.2.0
Common interfaces and patterns for system integration
|
Core KCENON_* macro definitions for feature detection. More...

Go to the source code of this file.
Macros | |
| #define | KCENON_HAS_INCLUDE(x) |
| Helper macro to check if __has_include is available. | |
| #define | KCENON_HAS_CPP_ATTRIBUTE(x) |
| Helper macro to check if __has_cpp_attribute is available. | |
| #define | KCENON_HAS_FEATURE(x) |
| Helper macro to check if __has_feature is available (Clang) | |
| #define | KCENON_HAS_BUILTIN(x) |
| Helper macro to check if __has_builtin is available. | |
| #define | KCENON_COMPILER_MSVC 0 |
| #define | KCENON_COMPILER_CLANG 0 |
| #define | KCENON_CLANG_VERSION 0 |
| #define | KCENON_COMPILER_GCC 0 |
| #define | KCENON_GCC_VERSION 0 |
| #define | KCENON_CPLUSPLUS __cplusplus |
| #define | KCENON_HAS_CPP17 (KCENON_CPLUSPLUS >= 201703L) |
| #define | KCENON_HAS_CPP20 (KCENON_CPLUSPLUS >= 202002L) |
| #define | KCENON_HAS_CPP23 (KCENON_CPLUSPLUS >= 202302L) |
| #define | KCENON_PLATFORM_WINDOWS 0 |
| #define | KCENON_PLATFORM_LINUX 0 |
| #define | KCENON_PLATFORM_MACOS 0 |
| #define | KCENON_PLATFORM_UNIX (KCENON_PLATFORM_LINUX || KCENON_PLATFORM_MACOS) |
| #define | KCENON_ENABLE_LEGACY_ALIASES 1 |
| Enable legacy macro aliases for backward compatibility. | |
| #define | KCENON_DEFINE_LEGACY_ALIAS(legacy_name, new_name) |
| Helper macro for defining legacy aliases. | |
Core KCENON_* macro definitions for feature detection.
This file provides the foundational macros used across all system modules for detecting compiler and standard library features. It is designed to be included first before any other feature detection headers.
Definition in file feature_flags_core.h.
| #define KCENON_CLANG_VERSION 0 |
Definition at line 79 of file feature_flags_core.h.
| #define KCENON_COMPILER_CLANG 0 |
Definition at line 78 of file feature_flags_core.h.
| #define KCENON_COMPILER_GCC 0 |
Definition at line 87 of file feature_flags_core.h.
| #define KCENON_COMPILER_MSVC 0 |
Definition at line 70 of file feature_flags_core.h.
| #define KCENON_CPLUSPLUS __cplusplus |
Definition at line 98 of file feature_flags_core.h.
| #define KCENON_DEFINE_LEGACY_ALIAS | ( | legacy_name, | |
| new_name ) |
Helper macro for defining legacy aliases.
Only defines the legacy alias if:
Definition at line 156 of file feature_flags_core.h.
| #define KCENON_ENABLE_LEGACY_ALIASES 1 |
Enable legacy macro aliases for backward compatibility.
When defined and set to 1, legacy aliases (COMMON_*, USE_*, etc.) will be available alongside the new KCENON_* macros. This provides a migration path for existing code.
Definition at line 145 of file feature_flags_core.h.
| #define KCENON_GCC_VERSION 0 |
Definition at line 88 of file feature_flags_core.h.
| #define KCENON_HAS_BUILTIN | ( | x | ) |
Helper macro to check if __has_builtin is available.
Definition at line 58 of file feature_flags_core.h.
| #define KCENON_HAS_CPP17 (KCENON_CPLUSPLUS >= 201703L) |
Definition at line 101 of file feature_flags_core.h.
| #define KCENON_HAS_CPP20 (KCENON_CPLUSPLUS >= 202002L) |
Definition at line 102 of file feature_flags_core.h.
| #define KCENON_HAS_CPP23 (KCENON_CPLUSPLUS >= 202302L) |
Definition at line 103 of file feature_flags_core.h.
| #define KCENON_HAS_CPP_ATTRIBUTE | ( | x | ) |
Helper macro to check if __has_cpp_attribute is available.
Definition at line 40 of file feature_flags_core.h.
| #define KCENON_HAS_FEATURE | ( | x | ) |
Helper macro to check if __has_feature is available (Clang)
Definition at line 49 of file feature_flags_core.h.
| #define KCENON_HAS_INCLUDE | ( | x | ) |
Helper macro to check if __has_include is available.
Some older compilers may not support __has_include. This provides a safe fallback mechanism.
Definition at line 31 of file feature_flags_core.h.
| #define KCENON_PLATFORM_LINUX 0 |
Definition at line 118 of file feature_flags_core.h.
| #define KCENON_PLATFORM_MACOS 0 |
Definition at line 124 of file feature_flags_core.h.
| #define KCENON_PLATFORM_UNIX (KCENON_PLATFORM_LINUX || KCENON_PLATFORM_MACOS) |
Definition at line 127 of file feature_flags_core.h.
| #define KCENON_PLATFORM_WINDOWS 0 |
Definition at line 112 of file feature_flags_core.h.