CARB_CPLUSPLUS#
Defined in carb/Defines.h
-
CARB_CPLUSPLUS#
Toolchain-independent way to check the C++ standard / version. On windows, the value of __cplusplus is unreliable - it is defined if using C++, but is set to 199711L, regardless of what /std:c++XX is used (unless you enable a special option, /Zc:__cplusplus): https://learn.microsoft.com/en-us/cpp/build/reference/zc-cplusplus It is not a drop-in replacement for __cplusplus, as it is always defined (but may be 0) ie,.
becomes#if defined(__cplusplus) && __cplusplus >= 201700
and#if CARB_CPLUSPLUS > 201700
becomes#ifdef __cplusplus
…though replacing __cplusplus when it is ONLY being checked for ifdef / defined is optional, as whether __cplusplus is defined at all is still reliable - it is only comparing against specific numbers that is unreliable across platforms.#if CARB_CPLUSPLUS