Any disadvantage of using const reference when iterating over basic types?
The standard containers all return references from their iterator (note, however, that some “containers aren’t really container, e.g., std::vector<bool> which returns a proxy). Other iterators might return proxies or values although this isn’t strictly supported. Of course, the standard doesn’t make any guarantees with respect to performance. Any sort of performance related feature (beyond complexity … Read more