gives me an error that "no instance of the overloaded method matches the argument list". If I use a normal iterator (without auto) it works. Something I'm missing?
Edit: mEnemies is a "std::vector<shared_ptr<Enemy>>" and mProjectiles is a "std::vector<unique_ptr<Projectile>>".
In a range-based for loop, the type of enemyItr is (a reference to) the same type as the elements contained in mEnemies. It is not an iterator. The same for projIter.
This should be very obvious from the compiler errors generated (or not generated) in the code previous to that referenced in your OP. For instance, iterators have no reset member.