XIEITE_LANG_TYPE_ /*???*/ , XIEITE_LANG_MAJOR_ /*???*/ , XIEITE_LANG_MINOR_ /*???*/ , XIEITE_LANG_PATCH_ /*???*/ , XIEITE_LANG_VER ()
Defined in header <xieite/pp/lang.hpp> Macros for identifying the current language and its version (major, minor, patch). The macros are not mutually exclusive.
Definitions
#typeAppend one of:#define XIEITE_LANG_TYPE_ /*???*/ /* boolean integer literal */ #define XIEITE_LANG_MAJOR_ /*???*/ /* integer literal */ #define XIEITE_LANG_MINOR_ /*???*/ /* integer literal */ #define XIEITE_LANG_PATCH_ /*???*/ /* integer literal */
C , CPP , CPP_CLI , CPP_CX , CPP_EMBEDDED , CPP_WINRT , CUDA , GLSL , HLSL , METAL , OBJ_C , OBJ_CPP , PSSL . See example.#ver
Allows up to two additional arguments for the minor and patch versions. Expands to an expression checking whether a language is present and the comparison of its version to the provided arguments.#define XIEITE_LANG_VER (_type ,_op ,_major ,... /* _minor, _patch */ )/* boolean expression */
Example
Possible output:int main () {std ::println ("Is current language C++26? ,{} "XIEITE_LANG_VER (CPP, ==,26 )); }
[View in Compiler Explorer]Is current language C++26? true