[Effective-cpp] Item 1: Uses and Abuses of vector
James Dennett
jdennett at acm.org
Wed Oct 27 14:47:00 EDT 2004
On Wednesday, October 27, 2004, at 03:07 AM, Mark Radford wrote:
> 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.
>
>
There are thoughts out there about fixing this in C++0x. I'd like to
see that happen.
-- James
More information about the Effective-cpp
mailing list