3 ms·
It generally tends to be in the case in large projects that having the type of every variable identified is useful. Projects that follow this rule generally res
by jcranmer 3y ago
It generally tends to be in the case in large projects that having the type of every variable identified is useful. Projects that follow this rule generally restrict the use of auto to a) cases where it's necessary (lambdas), b) cases where the type is obvious but spelling it properly is annoying or difficult (e.g., x.begin()--it's an iterator, everyone should understand that, but what is the actual name of that iterator class?), and c) cases where the type is repeated (e.g., if (auto *SI = dyn_cast<StoreInst>(I)), a common pattern in LLVM).