Library bug - Problem with string(string::reverse_iterator, string::reverse_iterator)
Paolo Carlini
pcarlini@unitus.it
Tue Jun 4 06:27:00 GMT 2002
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.
More information about the Libstdc++
mailing list