bx
bx copied to clipboard
Compatible with clang-cl
#include <print>
int main() {
std::println("__cplusplus={}", __cplusplus);
std::println("_MSVC_LANG={}", _MSVC_LANG);
return 0;
}
When compiled with /std:c++latest, clang-cl outputs:
__cplusplus=202400
_MSVC_LANG=202004
And when you add /Zc:__cplusplus option?
And when you add
/Zc:__cplusplusoption?
Yes. Actually in clang-cl, __cplusplus always has the correct value. Even without /Zc:__cplusplus.
Yes.
Yes what?
Does _MSVC_LANG match __cplusplus once you set /Zc:__cplusplus?
I have added /Zc:__cplusplus.