Description
@python/windows-team
I noticed the VS project file _wmi.cxproj
for _wmimodule.cpp
added for 3.12 to support using WMI on Windows to get platform
data in issue #89545 / PR #96289 specifies C++20 mode via the compiler flag /std:c++20
. The flag (and partially-complete C++20 support) was only added in VS 2019 16.11, and produces a compiler warning in VS 2017 15.9 stating the flag was ignored.
This is the only file that requires it and there were no relevant hints in the issue, PR, or commit history as to why it was required. Despite the flag being ignored, there were no compiler errors or other warnings, and both the full test suite (minus a couple clearly unrelated issues) and running test_wmi
and test_platform
with -u all
passed, and the same was true when I recompiled it with /std:c++17
(added in VS 2017 15.8 and used a couple other files), which naturally avoids the warning.
Therefore, it would seems specifying C++20 is unnecessary, and it can be changed to /std:c++17
to avoid compiler warnings and use a consistent C++ standard version with the other files, unless there's something I'm missing here (entirely possible, of course). Any reason this was added?