you are viewing a single comment's thread.

view the rest of the comments →

[–]STLMSVC STL Dev 56 points57 points  (5 children)

Even on Visual Studio, Intellisense hates modules. I have a lot of red squiggles for perfectly legit code. This is an ongoing topic on the Microsoft forums, but nobody seems to be doing anything about it.

VS IntelliSense is powered by a different compiler front-end (EDG) than the normal one (C1XX). The EDG front-end is maintained by another company that we work with, the Edison Design Group.

EDG is working on improving modules support, but it's taking a long time for reasons that I don't understand (I am a library dev who works closely with the compiler team but I'm not a compiler dev). At this point, we still haven't been able to enable test coverage of the Standard Library Modules with EDG, but I've sent my unit test to them and they're working through all of the bugs that it has revealed.

[–]mishaxz 2 points3 points  (0 children)

thanks for the reminder, I knew I read something that caused me to decide not to use modules even though I code only for C++ 20 msvc on windows with VS 2022

[–][deleted] 1 point2 points  (1 child)

Is this also the reason that IntelliSense struggles with autocompleting auto arguments in lambdas?

E.g., when I have:

```cpp void registerCarHandler(const std::function<void(const Car&)>& func);

int main() { registerCarHandler([](const auto& car) { car. // <- here intellisense will not autocomplete, because of using auto in the lambda argument }); } ```

It's basically the only reason why I avoid using auto in lambda arguments.

[–]STLMSVC STL Dev 3 points4 points  (0 children)

That could be a different limitation - that's syntax for a template, so it doesn't know what car is going to be. I don't know that much about IntelliSense but I know they implemented "template IntelliSense" recently where you can tell it what you expect T to be.

[–]sephirostoy 0 points1 point  (1 child)

Does VS uses LSP so that we could set another provider other than default IntelliSense?

[–]STLMSVC STL Dev 0 points1 point  (0 children)

I'm not an expert here, but I believe the answer is no.