3 ms·
I think one of the key things that makes 'auto' much more painful than 'var' is that in Visual Studio, the intellisense in C# is much more reliable than C++. An
by DubiousPusher 11y ago
I think one of the key things that makes 'auto' much more painful than 'var' is that in Visual Studio, the intellisense in C# is much more reliable than C++. Any ambiguous statement like the first example is quickly and resolved in C# with a quick F12. In C++, this doesn't always work especially when you're using any kind of cobbled together or hybrid build system.
A lot of times, the type is unimportant but when it is, this kind of usage can bloat a simple task into 5 to 15 minutes of hunting through headers or grepping.
It's strange to think of an IDE feature so impacting a language feature. The stack is not supposed to affect in that direction but this is one case where it really does.