[Effective-cpp] Item 1: Uses and Abuses of vector
Mark Radford
mark at twonine.co.uk
Wed Oct 27 06:07:36 EDT 2004
On Sat, 23 Oct 2004, at 14:27:02, Balog Pal <pasa at lib.hu> writes
>I' a big fan of const but for this situation I recall Scott Meyers had
>reservations on using const_iterator in ESTL.
He just pointed out that, because of a design fault in the STL, you
sometimes can't use const_iterator when you ought to be able to. For
example, container::erase takes (non-const) iterators as arguments, when
it could take const_iterators because the container is being modified,
not its elements.
- Mark.
--
Mark Radford
twoNine Computer Services Ltd - Software Development & Consultancy
http://www.twonine.co.uk
More information about the Effective-cpp
mailing list