Compilation error with MSVC 19

Yuriy Skalko yuriy.skalko at gmail.com
Wed Dec 30 08:01:16 UTC 2020


> Here is a newer version of the patch that does not use _HAS_CXX17, as it
> should not really be relied upon (
> https://stackoverflow.com/questions/52379233/is-has-cxx17-marco-usable-in-custom-project-headers-to-enable-c17-language).

I think the right way will be using only standard-compliant 
"__cplusplus" in sources and adding the option "/Zc:__cplusplus" for 
MSVC compiler in the build scripts so it handle __cplusplus in 
standard-compliant way:

https://docs.microsoft.com/en-us/cpp/build/reference/zc-cplusplus?view=msvc-160


Yuriy


More information about the lyx-devel mailing list