Dan - if you mouse over myVar it will tell you that it is a MyNamespace::MyClassType<int>*.
By leaving your code as an `auto` it means you can update MyFunction()'s return type without having to then run around and update callers (or not as much). It also avoids possible logic errors where you're not asking for a conversion from the actual return type to your explicitly declared type.
You might still want this for some things - but you appear to going against the flow of modern coding standards (and the reasons they were introduced).
Dan - if you mouse over myVar it will tell you that it is a MyNamespace::MyClassType<int>*.
By leaving your code as an `auto` it means you can update MyFunction()'s return type without having to then run around and update callers (or not as much). It also avoids possible logic errors where you're not asking for a conversion from the actual return type to your explicitly declared type.
You might still want this for some things - but you appear to going against the flow of modern coding standards (and the reasons they were introduced).
There are definitely reasons to not use auto - for one, it makes it much easier to see what is going on at a glance, and you actually *reduce* errors by stopping the compile if you change the return type of something without caring.
Many large projects (for example, Unreal Engine) completely forbid the usage of auto unless it's an unreadable template type.
It is a problem. I prefer the clarity of having the type spelled out sometimes - but I also like the automatic update if I change the interface slightly, or choose a different interface with similar semantics.
There is no 100% winning - just a case by case "what makes sense here" - and I don't know about you - but I find that annoying and somewhat unsatisfactory.
One use case that has been suggested for this refactoring is when you type auto, fully intending to have it expanded by VA once you have written the line, since it is faster and easier to type auto and expand it than it is to type the full type.
Personally I have always liked clear full types, but especially when working with templates they can get very long to write out.