XTE _ ARCH
Defined in header <xte/preproc/arch.hpp> Macros for detecting the current architecture. Definitions are compiler-dependent and not mutually exclusive.
Replace
NAME with one of: Definitions
#archDetects the presence of an architecture.#define XTE_ARCH_ NAME /* boolean integer literal */
#major
Detects the major version of an architecture.#define XTE_ARCH_ NAME _MAJOR /* integer literal */
#minor
Detects the minor version of an architecture.#define XTE_ARCH_ NAME _MINOR /* integer literal */
#patch
Detects the patch version of an architecture.#define XTE_ARCH_ NAME _PATCH /* integer literal */
#version
#define XTE_ARCH (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 an architecture's version to the provided arguments.Example
Possible preprocessor output:#if XTE_ARCH_X86_64 yup#else nop#endif
[View in Compiler Explorer]yup