MSVC: use the newer conformant preprocessor
As explained in the /Zc:preprocessor documentation [1], it enables "a token-based preprocessor that conforms to C99 and C++11 and later standards", available since Visual Studio 2019 version 16.5. It helps to workaround an IntelliSense bug [2], which disables highlighting and code completion in the IDE integration when certain Boost libraries are included; but using a better preprocessor can't hurt in general, right? [1] https://learn.microsoft.com/en-us/cpp/build/reference/zc-preprocessor [2] https://developercommunity.visualstudio.com/t/IntelliSense-reports-many-errors-for-the/10287480#T-ND10303205 Change-Id: I5268f2dd4acf01cc1da23cfe76653c2f6c688c05 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148484 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
This commit is contained in:
@@ -7513,7 +7513,7 @@ if test -z "${CXXFLAGS_CXX11+x}"; then
|
||||
else
|
||||
CXXFLAGS_CXX11=-std:c++17
|
||||
fi
|
||||
CXXFLAGS_CXX11="$CXXFLAGS_CXX11 -permissive- -Zc:__cplusplus"
|
||||
CXXFLAGS_CXX11="$CXXFLAGS_CXX11 -permissive- -Zc:__cplusplus,preprocessor"
|
||||
elif test "$GCC" = "yes" -o "$COM_IS_CLANG" = TRUE; then
|
||||
my_flags='-std=c++17 -std=c++1z'
|
||||
if test "$with_latest_c__" = yes; then
|
||||
|
Reference in New Issue
Block a user