Re: <map> erase
- From: "P.J. Plauger" <pjp@xxxxxxxxxxxxxx>
- Date: Wed, 5 Oct 2005 12:24:44 -0400
"Jason Winnebeck" <gillius-ng@xxxxxxxxxxxxxxxxxx> wrote in message
> P.J. Plauger wrote:
>> At the moment. The C++ library committee has already agreed that
>> erase should return an iterator for the associative containers
>> in the revised C++ Standard.
> I'm curious on this point, and if anyone knows the answer, it would be
> interesting to hear. I've been wondering which of the two situations
> apply here:
> 1. Did the committee, at the time, purposely did not have erase for
> associative containers return an iterator (if so, why), but now have
> decided otherwise?
> 2. Or was it simply an oversight, and void erase was never the intention
> at any time?
I've discussed this many times over the past decade. I no longer
have the paper trail, but my recollection was that an early
draft of the C++ Standard called for associative erase to return
an iterator. That disappeared with some "Friday afternoon edit"
(an all too common phenomenon) after we had shipped to more than
one major customer, including MS). When we became aware of the
change, we chose to leave our implementation alone, because:
a) Existing customers had come to depend on it, and
b) It took a pretty artificial program to show up the
We have since convinced the C++ committee to change the
(future) C++ Standard to match what we've done all along.
Thus, we have less reason than ever to remove this
feature. But our latest library will let you get void
erase functions by defining the macro _HAS_STRICT_CONFORMANCE,
for those who are pedantic enough to care (like validation
- Prev by Date: Re: <map> erase
- Next by Date: Re: <map> erase
- Previous by thread: Re: <map> erase
- Next by thread: Re: <map> erase