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

#type
#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 */
Append one of: 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
#define XIEITE_STDLIB_VER(_type, _cmp, _major, .../* _minor, _patch */) /* boolean expression */
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.


Example

int main() {
	std::println("Is standard library libstdc++ >= v2.41? {}", XIEITE_STDLIB_VER(GNU_CPP, >=, 2, 41));
}
Possible output:
Is standard library libstdc++ >= v2.41? true
[View in Compiler Explorer]