diff options
author | fanquake <fanquake@gmail.com> | 2021-02-23 12:49:56 +0800 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2021-02-23 12:51:50 +0800 |
commit | 5e531e6beb5381c0be5efaa24b7e423e593568e4 (patch) | |
tree | 0f4ff89e9a5ea6d00f3074284c2826059bc11954 /build_msvc/common.init.vcxproj | |
parent | c7b46489f8c4d880382248fb47266d81948bbce0 (diff) |
assumptions: check C++17 assumption with MSVC
From my reading of
https://docs.microsoft.com/en-us/cpp/build/reference/zc-cplusplus?view=msvc-160
and
https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/
if we set the `/Zc:__cplusplus` switch in additional options, MSVC will
report the correct value for `__cplusplus`.
Diffstat (limited to 'build_msvc/common.init.vcxproj')
-rw-r--r-- | build_msvc/common.init.vcxproj | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/build_msvc/common.init.vcxproj b/build_msvc/common.init.vcxproj index 9c589bccbc..a3487c7a0d 100644 --- a/build_msvc/common.init.vcxproj +++ b/build_msvc/common.init.vcxproj @@ -96,7 +96,7 @@ <ClCompile> <WarningLevel>Level3</WarningLevel> <PrecompiledHeader>NotUsing</PrecompiledHeader> - <AdditionalOptions>/utf-8 /std:c++17 %(AdditionalOptions)</AdditionalOptions> + <AdditionalOptions>/utf-8 /Zc:__cplusplus /std:c++17 %(AdditionalOptions)</AdditionalOptions> <DisableSpecificWarnings>4018;4221;4244;4267;4334;4715;4805;4834</DisableSpecificWarnings> <TreatWarningAsError>true</TreatWarningAsError> <PreprocessorDefinitions>_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING;_SILENCE_CXX17_OLD_ALLOCATOR_MEMBERS_DEPRECATION_WARNING;ZMQ_STATIC;NOMINMAX;WIN32;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_CONSOLE;_WIN32_WINNT=0x0601;_WIN32_IE=0x0501;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions> |