Re: strange crash after assertion with std::map::iterator



So what I'm saying is that it's rather unfortunate that the standard does
not enforce such a requirement for all iterators, since the implementation
would be trivial.

I would rather it remain as it is now for performance reasons.
It is no different from uninitialised pointers, automatic variables, memory
obtained from operator new/new[] & malloc().
So it is keeping with what C++ does in other areas.

If it was mandated as you suggest, everyone else has to pay for their
programs running a fraction more slowly even if they did not want it.

Stephen Howe




.


Loading