What\'s the difference between the types of bar1 and bar2?
bar1
bar2
int foo = 10; auto bar1 = &foo; auto *bar2 = &foo;
Using auto * "documents intention". And auto *p = expr; can be deduced correctly only if expr returns pointer. Example:
auto *
auto *p = expr;
expr
int f(); auto q = f(); // OK auto *p = f(); // error: unable to deduce 'auto*' from 'f()'