-
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
C++20 spans and range algorithms give erroneous Intellisense errors #10024
Comments
Experiencing similar issue. Despite configuring |
Hi @0xjc . I'm able to reproduce the issue. I've opened an internal issue (1656876) against the IntelliSense library. We share the IntelliSense implementation with VS. |
Hi! I'm having a similar issue. I get this error when using std::ranges::any_of and similar messages with other ranges stuff. The code compiles just fine with GCC 11 though.
|
I face the same issue, is there any progress on the internal issue you opened @Colengms? |
Yeah last I checked this issue is still ongoing so an update would be appreciated. |
I have the same issue, with GCC 12 |
No progress has been made yet, but I've pinged the team and mentioned the 9 or so upvotes or user comments. UPDATE: The bug has been fixed (for 1.15.0), but we still have to merge in the fix and test it out. |
Also having this issue. Probably related: intellisense believes |
Having the same issue with gcc 12.2 trying to use any std::ranges functions, gives such errors |
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. |
I can confirm it works for me with the update extension and my test-case ( |
Is this fixed in vs code ? I use it on Windows and it auto updates regularly but Intellisense still reports an error when converting from std::vector using std::span constructor. |
@janderudder It's fixed with 1.15.1 (pre-release), but there are other span/range-related bugs that are not fixed yet which we have other issues tracking, so you could be hitting those or you could file a new issue with more repro details. |
Thank you @sean-mcmanus. I think I'm in the most basic situation of getting, for instance, I just noticed that the error goes away when disabling Microsoft's "C/C++ for Visual Studio Code" extension. I have vscode 1.77.0. Edit: oh but that disables C++ Intellisense entirely it seems. I thought it retained most of its features without this extension. My bad. |
@janderudder Can you file a new bug report on that with a code sample and info like the compiler/OS used? I'm not sure if that particular case tracked by an existing issue or not. |
Fixed with https://github.com/microsoft/vscode-cpptools/releases/tag/v1.15.4, and more range fixes are going to be in 1.16.0 (#8039). |
Environment
When using gcc-10 in C++20 mode, Intellisense will often give errors on conversions of contiguous ranges to
std::span
, and also when using most algorithms understd::ranges
. This code compiles and works properly underg++-10 -std=c++20
.Bug Summary and Steps to Reproduce
See code
Expected behavior
No response
Code sample and Logs
Code sample:
c_cpp_properties.json
:Diagnostics:
Screenshots
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: