You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Problem:
When using fmt::file and fmt::output_file with Visual Studio 2019 and Visual Studio Code on Windows, the linters in both yield the following errors because they can't find the required definitions:
However, the actual compile succeeds. This is because a macro (FMT_HAS_INCLUDE) is disabled only when IntelliSense is linting, not when MSVC is compiling (this workaround is from a VS 2015 IntelliSense bug: #842). But disabling this macro in newer versions of VS is no longer necessary and leads to the errors mentioned above.
The Proposed Fix:
Change the definition of FMT_HAS_INCLUDE to:
In addition to making a decision based on the absence/presence of IntelliSense, this revised code will also check if MSVC's version macro is above 1900 (the value corresponding to VS2015). This retains the original workaround while removing the false errors on newer VS versions.
Is this feasible and can this work in all cases? If so, will a PR be accepted? Thanks!
The text was updated successfully, but these errors were encountered:
The Problem:
When using
fmt::file
andfmt::output_file
with Visual Studio 2019 and Visual Studio Code on Windows, the linters in both yield the following errors because they can't find the required definitions:However, the actual compile succeeds. This is because a macro (
FMT_HAS_INCLUDE
) is disabled only when IntelliSense is linting, not when MSVC is compiling (this workaround is from a VS 2015 IntelliSense bug: #842). But disabling this macro in newer versions of VS is no longer necessary and leads to the errors mentioned above.The Proposed Fix:
Change the definition of
FMT_HAS_INCLUDE
to:In addition to making a decision based on the absence/presence of IntelliSense, this revised code will also check if MSVC's version macro is above
1900
(the value corresponding to VS2015). This retains the original workaround while removing the false errors on newer VS versions.Is this feasible and can this work in all cases? If so, will a PR be accepted? Thanks!
The text was updated successfully, but these errors were encountered: