[RFC/Patch] libstdc++/23767

Paolo Carlini pcarlini@suse.de
Sun Sep 11 15:26:00 GMT 2005


Hi everyone, hi Gaby,

I'm trying to figure the "best" fix for this annoying issue, due
basically to the templatized constructor of our __normal_iterator, which
gives us problems when an overload set including both iterator and
const_iterator is constructed (see attached testcase).

Chris proposed in the audit trail a sophisticated solution using
enable_if and is_convertible, which is general and avoids code
duplication, but, well, brings in the usual trickeries (an additional
dummy argument, is_convertible should be uglified in order to be used, etc.)

An alternate solution, much more simple which I'm currently exploring
(regtesting and testcase coming with 23767 are both OK) is the attached,
which consists only of two specializations for const Tp* and Tp* (the
cases that really matter in our library) for the first template argument
of __normal_iterator. This one too should be safe from the point of view
of the binary compatibility.

What do you think? 1), 2) or... 3) ??

Paolo.

////////////////////
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 23767.cc
Type: text/x-c++src
Size: 374 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20050911/b48e037a/attachment.bin>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch_23767_alt
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20050911/b48e037a/attachment.ksh>


More information about the Libstdc++ mailing list