4 ms·
And array over-runs are just the beginning! (friends don't let friends use idices over iterators) Had a fun bug at work once where we somehow accidentally buil
by missblit 9y ago
And array over-runs are just the beginning! (friends don't let friends use idices over iterators)
Had a fun bug at work once where we somehow accidentally built against two subtly incompatible versions of the same library.
This actually mostly worked until some random virtual function call sometimes called the wrong function silently...
- entelechy0 9y ago> And array over-runs are just the beginning! (friends don't let friends use idices over iterators) It depends on the context. If the data-structure that you are iterating over gets mutated in the middle of iteration, it makes more sense to manually manage an index into that structure to avoid errors/exceptions. Iterators are great for simple iteration however.
- petters 9y agoYes, C++ without a monorepo is very difficult.