Hello @Thomas_Herondale,
This is the same issue as the previous one.
Due to the same bug, we aren’t able to find standard header files with MSVC which leads to a lot of false positives. In your case with std::string
. This bug has the potential of impacting the behavior of every rule.
As a workaround until the fix is shipped you can try to temporarily explicitly add the Microsoft standard include to your project.
For example, adding this to my CMake made the false-positive disappear:
include_directories(
SYSTEM
“C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\ATLMFC\include”
“C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include”
“C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um”
“C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt”
“C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared”
“C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um”
“C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt”
“C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt”
)
You should be able to find your system include by checking the Microsoft INCLUDE
environment variable.
Note: you will have to reload the CMake for the new configuration to take effect.