-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Intellisense no longer resolves overloaded range algorithm with range as first argument? #10252
Comments
Note: in the screenshot I simplified the second transform operation by removing "std::toupper", just to see if that would change the outcome. It did not change anything. |
I have just installed the "Microsoft Build Tools for Visual Studio 2022" and used them ("cl.exe" with the "/std:c++latest" option to be precise) inside VS Code in Windows (hence no WSL2 here). VS Code C++ linter correctly handles the ranges library features mentioned above with msvc (cl.exe). To sum up:
This problem seems to be related to the "remote WSL2 thing"... |
I rolled back VS Code from 1.74.0 to 1.71.2... The issue was still there. Then I rolled back the C/C++ extension from 1.13.6 to 1.12.4 and found out there was no issue anymore. Conclusion: The C/C++ extension 1.13.6 brings an issue (not present in the 1.12.4 version) with the WSL2 remote environment. So I will stay with the 1.12.4 version, until this linter bug is fixed. |
I have the same error with the following code #include <vector>
#include <algorithm>
int main(){
std::vector<int> v = {1, 2, 3, 4};
std::ranges::find(v.begin(), v.end(), 1); // No error
std::ranges::find(v, 1); // "no instance of overloaded function ..."
} the error:
And my {
"C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools",
"C_Cpp.default.cppStandard": "c++20",
"C_Cpp.default.cStandard": "c17",
"C_Cpp.default.intelliSenseMode": "linux-gcc-x64"
} And the same thing, everything compile fine but I get this intellisense error message. Environment
|
Bumping for visibility on this. I was able to resolve it for now with @jducaud's solution. |
I've reported an internal bug on VS: 1706892 and let them know we consider this a high priority. |
Hello Sean (@sean-mcmanus ), have you any good news about this VS Code internal bug? Is there a way to follow its processing? I tried unsuccessfully to find a VS Code repository issue #1706892 - It seems that the issue numbers are more around 172000 on this repository nowadays, but maybe, as it's an "internal" bug, it has not public visibility... or it is simply a typo in your message? (an unwanted extra-digit) Regards, Jerome. |
@jducaud The bug is in the internal VS bug database so it's not publicly visible -- the bug is active/approved...no other updates yet. I've added a message to the issue. |
Thank you @sean-mcmanus ! |
Same issue, keep getting errors on valid std::ranges calls, doesn't matter which function of the ranges library I use |
The fix is available with 1.15.0 (pre-release): https://github.com/microsoft/vscode-cpptools/releases/tag/v1.15.0 If you're still hitting an incorrect IntelliSense error with ranges, you're probably hitting a different root cause bug, such as #9953 and #8039, or let us know the details in a new issue if you believe it's a different root cause. |
Thank you @sean-mcmanus! |
Environment
Today (2022-12-07 - because yesterday - 2022-12-07 - everything was fine), Intellisense reports multiple errors in the VS Code problems panel. All those errors concern the C++ ranges library:
Only intellisense is affected. The compilation/run task (in WSL and Compiler Explorer) is performed without errors.
Bug Summary and Steps to Reproduce
Bug Summary: Intellisense yields false errors regarding some ranges library features:
Steps to reproduce:
Try:
And
Expected behavior
Intellisense should not yield those false errors. It compiles and runs fine with gcc 12.1 in WSL/Ubuntu-22.04 and it compiles and runs fine with x86-64 gcc 12.1 in Compiler Explorer.
Yesterday everything was working fine and I did not modify any settings in VS Code since.
Code sample and Logs
Screenshots
CTRL+F5 in VS Code yields:
The output is:
Additional context
No response
The text was updated successfully, but these errors were encountered: