Quick A: they are the same
Recently on SO:
Quick Q: C++11 auto declaration with and without pointer declarator
The declarations are exactly equivalent.
autoworks (almost) the same as template type deduction. Putting the star explicitly makes the code a bit easier to read, and makes the programmer aware thatbar2is a pointer.

Add a Comment
Comments are closed.