XIEITE_STDLIB_TYPE_ /*???*/ , XIEITE_STDLIB_MAJOR_ /*???*/ , XIEITE_STDLIB_MINOR_ /*???*/ , XIEITE_STDLIB_PATCH_ /*???*/ , XIEITE_STDLIB_VER ()
Defined in header <xieite/pp/stdlib.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_STDLIB_TYPE_ /*???*/ /* boolean integer literal */ #define XIEITE_STDLIB_MAJOR_ /*???*/ /* integer literal */ #define XIEITE_STDLIB_MINOR_ /*???*/ /* integer literal */ #define XIEITE_STDLIB_PATCH_ /*???*/ /* integer literal */
BIONIC_C , CLOUDABI_C , COMO_CPP , DINKUMWARE_CPP , ECPPS , GNU_C , GNU_CPP , IBM_VA_CPP , KLIBC , LLVM_C , LLVM_CPP , METROWERKS_CPP , MFC_CPP , MODENA_CPP , MSVC_CPP , PDP_C , ROGUEWAVE_CPP , SGI_CPP , UCLIBC , VMS_C , Z_C , Z88DK_C . See example.#ver
Allows up to two additional arguments for the minor and patch versions. Expands to an expression checking whether a standard library is present and the comparison of its version to the provided arguments.#define XIEITE_STDLIB_VER (_type ,_op ,_major ,... /* _minor, _patch */ )/* boolean expression */
Example
Possible output:int main () {std ::println ("Is standard library libstdc++ >= v2.41? ,{} "XIEITE_STDLIB_VER (GNU_CPP, >=,2 ,41 )); }
[View in Compiler Explorer]Is standard library libstdc++ >= v2.41? true