Using auto
when the type that would be deduced is a pointer type can cause confusion. It is much better to specify the pointer part
outside of auto
.
Noncompliant code example
auto item = new Item(); // Noncompliant
Compliant solution
auto* item = new Item();