[Patch] libstdc++/24061, aka issue 6.19

Paolo Carlini pcarlini@suse.de
Sun Oct 9 00:19:00 GMT 2005


Hi,

the below implements the resolution of issue 6.19 (voted into the TR),
quite a bit of work ;)

In order to make possible overloads for iterator and const_iterator of
the various insert and erase members, I added separate
hashtable_const_iterator and node_const_iterator types - similarly to
what happens in our std::list - to which hashtable_iterator and
node_iterator, respectively, are convertible. In case the container has
both iterator and const_iterator of constant iterator type - i.e., case
of unordered_set and unordered_multiset - the constant_iterators
template parameter is true and the pointer and reference typedefs are
adjusted accordingly to const.

Then, the implementation of 6.19 proper becomes easy.

In the process I have also fixed a problem with the return type of
insert with hint, which must be always an iterator (const_iterator),
never a pair<iterator, bool>.

Tested x86-linux (will go in mainline only)

Paolo.

////////////////////
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CL_24061
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20051009/2a1adae9/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch_24061
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20051009/2a1adae9/attachment-0001.ksh>


More information about the Libstdc++ mailing list