Common System 0.2.0
Common interfaces and patterns for system integration
Loading...
Searching...
No Matches
feature_flags.h File Reference

Unified feature flags header for common_system. More...

Include dependency graph for feature_flags.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define COMMON_HAS_SOURCE_LOCATION   KCENON_HAS_SOURCE_LOCATION
 Legacy alias definitions for backward compatibility.
 
#define KCENON_HAS_STD_SOURCE_LOCATION   KCENON_HAS_SOURCE_LOCATION
 

Detailed Description

Unified feature flags header for common_system.

This is the main entry point for all feature detection and integration flags in the common_system library. Include this header to get access to all KCENON_* feature macros.

Header organization:

Usage:

#if KCENON_HAS_SOURCE_LOCATION
#include <source_location>
using location_type = std::source_location;
#else
using location_type = kcenon::common::source_location;
#endif
#if KCENON_HAS_JTHREAD
std::jthread worker([](std::stop_token st) { ... });
#else
std::thread worker([]{ ... });
#endif
Unified feature flags header for common_system.
C++17-compatible source_location implementation using compiler builtins.
Definition utils.cppm:54
See also
feature_flags_core.h for preprocessor helpers
feature_detection.h for C++ feature detection
feature_system_deps.h for system integration flags

Definition in file feature_flags.h.

Macro Definition Documentation

◆ COMMON_HAS_SOURCE_LOCATION

#define COMMON_HAS_SOURCE_LOCATION   KCENON_HAS_SOURCE_LOCATION

Legacy alias definitions for backward compatibility.

These aliases map old macro names to the new KCENON_* convention. They are only defined if:

  1. KCENON_ENABLE_LEGACY_ALIASES is enabled (default: 1)
  2. The legacy macro is not already explicitly defined

This ensures that explicit user definitions (including explicit 0 values) are respected and not overwritten.

Note
Legacy aliases are planned for deprecation in v0.4.0 and removal in v1.0.0. Migrate to KCENON_* macros.

Definition at line 75 of file feature_flags.h.

◆ KCENON_HAS_STD_SOURCE_LOCATION

#define KCENON_HAS_STD_SOURCE_LOCATION   KCENON_HAS_SOURCE_LOCATION

Definition at line 81 of file feature_flags.h.