This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Library bug - Problem with string(string::reverse_iterator, string::reverse_iterator)
- From: Paolo Carlini <pcarlini at unitus dot it>
- To: Ryszard dot Kabatek at softax dot pl
- Cc: libstdc++ at gcc dot gnu dot org, bkoz at nabi dot net, bkoz <bkoz at redhat dot com>
- Date: Tue, 04 Jun 2002 15:25:42 +0200
- Subject: Re: Library bug - Problem with string(string::reverse_iterator, string::reverse_iterator)
Hi all, hi Benjamin,
indeed I could reproduce the produce and I'm convinced it is regression
wrt 3.0.4 which must be fixed ASAP.
I could also confirm that the problem is due to this check:
// NB: Not required, but considered best practice.
if (__builtin_expect(__beg == _InIter(0), 0))
__throw_logic_error("attempt to create string with null pointer");
which was introduced with:
http://gcc.gnu.org/ml/gcc-cvs/2002-03/msg00516.html
Benjamin, could you possibly explain to me a bit the structure of that
kind of check? We should find a way to modify it to work well also with
reverse_iterator, IMO.
Ciao, Paolo.