XTE _ STDLIB
Defined in header <xte/preproc/lang.hpp> Macros for detecting the standard library. Definitions are compiler-dependent and might not be mutually exclusive.
Replace
NAME with one of: Definitions
#stdlibDetects the presence of an standard library.#define XTE_STDLIB_ NAME /* boolean integer literal */
#major
Detects the major version of a standard library.#define XTE_STDLIB_ NAME _MAJOR /* integer literal */
#minor
Detects the minor version of a standard library.#define XTE_STDLIB_ NAME _MINOR /* integer literal */
#patch
Detects the patch version of a standard library.#define XTE_STDLIB_ NAME _PATCH /* integer literal */
#version
#define XTE_STDLIB (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 standard library's version to the provided arguments.Example
Possible preprocessor output:#if XTE_STDLIB (GNU_CPP , >=,17 ) yup#else nop#endif
[View in Compiler Explorer]yup