3 ms·
The general rule of thumb for us is "auto is allowed if the type is written on the line somewhere, or if you're writing a for-each of a container, where it has
by Asooka 8y ago
The general rule of thumb for us is "auto is allowed if the type is written on the line somewhere, or if you're writing a for-each of a container, where it has to be const auto &, unless you have good justification for the copies". The inadvertent copies in for-each constructs are the biggest pitfall for us, because let's just say you don't pick C++ to write software that doesn't have to be as fast as possible :) .