XTE _ PLATFORM
Defined in header <xte/preproc/lang.hpp> Macros for detecting the current platform. Definitions are compiler-dependent and might not be mutually exclusive.
Replace
NAME with one of: Definitions
#platformDetects the presence of an platform.#define XTE_PLATFORM_ NAME /* boolean integer literal */
#major
Detects the major version of a platform.#define XTE_PLATFORM_ NAME _MAJOR /* integer literal */
#minor
Detects the minor version of a platform.#define XTE_PLATFORM_ NAME _MINOR /* integer literal */
#patch
Detects the patch version of a platform.#define XTE_PLATFORM_ NAME _PATCH /* integer literal */
#version
#define XTE_PLATFORM (NAME ,OP ,MAJOR ,/* MINOR, PATCH */ ... )/* boolean expression */
OP must be <, <=, >, >=, ==, or !=. Allows up to two additional arguments for the minor and patch versions. Expands to an expression comparing a platform's version to the provided arguments.Example
Possible preprocessor output:#if XTE_PLATFORM_LINUX yup#else nop#endif
[View in Compiler Explorer]yup