-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
C/C++ extension flags error with std::bind, but code compiles without error #10304
Comments
You appear to have provided the CMake Tools Log Diagnostics instead of the C/C++ extension Log Diagnostics -- can you provide our logs? In particular, I'm not reproing the bug (yet), so I was looking for a configuration setting that might be required. |
Also, your C/C++ logging doesn't show any file being opened (so no IntelliSense for the file). |
cpptools/queryTranslationUnitSource: C:\Users\Jim\source\bind.cpp (id: 144) |
The problem exists for C++17 and earlier. No problem with C++20. |
Okay, I repro it now -- it only repros with the windows-msvc-arm64 intelliSenseMode and not the windows-msvc-x64 mode. |
This is already fixed in our pending 1.14.0 update (we may release it in a week or two, not sure). |
The fix is available with 1.14.0 (pre-release): https://github.com/microsoft/vscode-cpptools/releases/tag/v1.14.0 |
Environment
Bug Summary and Steps to Reproduce
Bug Summary:
std::function<...> f = std::bind(...) is flagged by Cpptools with error:
no suitable user-defined conversion from "std::_Binder<std::_Unforced, int (A::*)(int x), A *, const std::_Ph<1> &>" to "std::function<int (int)>" existsC/C++(312)
but it compiles with MSVC from latest Visual Studio Community edition tools, and executes properly.
Disabling Cpptools removed the error.
Here is a program that illustrated the problem:
Reload Required
button. The std::bind call is no longer flagged.Expected behavior:
The std::bind call should not be flagged by Cpptools.
Configuration and Logs
Other Extensions
All other extensions disabled. Bug still there.
Additional context
No response
The text was updated successfully, but these errors were encountered: