configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit f5cceefde86bcc7d563469c7aba0009a5611adb0
Author: Mike Kaganski <[email protected]>
AuthorDate: Wed Mar 8 18:40:51 2023 +0300
Commit: Mike Kaganski <[email protected]>
CommitDate: Wed Mar 8 20:47:54 2023 +0000
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 <[email protected]>
diff --git a/configure.ac b/configure.ac
index 403f81635f0b..d8ec4664bd25 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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