stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <>
Subject Re: testing exception safety of string member templates ([Fwd: failure notice])
Date Tue, 06 Jun 2006 15:19:17 GMT
Hey Anton, this bounced yesterday. Please see the attachment
to read the whole email.


-------- Original Message --------
Subject: failure notice
Date: 6 Jun 2006 02:02:03 -0000

Hi. This is the qmail-send program at
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.

ezmlm-reject: fatal: Sorry, I don't accept messages larger than 100000 
bytes (#5.2.3)

--- Below this line is a copy of the message.

Return-Path: <>
Received: (qmail 99667 invoked by uid 99); 6 Jun 2006 02:02:02 -0000
Received: from (HELO (
     by (qpsmtpd/0.29) with ESMTP; Mon, 05 Jun 2006 19:02:02 
X-ASF-Spam-Status: No, hits=0.0 required=10.0
Received-SPF: neutral ( local policy)
Received: from [] (HELO (
     by (qpsmtpd/0.29) with ESMTP; Mon, 05 Jun 2006 19:01:58 
Received: from ([])
	by (8.13.4/8.13.4) with ESMTP id k5620nXE003142
	for <>; Tue, 6 Jun 2006 02:00:49 GMT
Received: from [] ([]) by with Microsoft SMTPSVC(6.0.3790.1830);
	 Mon, 5 Jun 2006 20:01:48 -0600
Message-ID: <>
Date: Mon, 05 Jun 2006 20:01:34 -0600
From: Martin Sebor <>
Organization: Rogue Wave Software
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) 
X-Accept-Language: en-us, en
MIME-Version: 1.0
Subject: Re: testing exception safety of string member templates (was: Re:
  lib.string.capacity test update)
References: <>
In-Reply-To: <>
Content-Type: multipart/mixed;
X-OriginalArrivalTime: 06 Jun 2006 02:01:48.0696 (UTC) 
X-Virus-Checked: Checked by ClamAV on

This is a multi-part message in MIME format.
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Anton Pevtsov wrote:
> Unfortunately, the gcc 4.0 fails to compile the changes you made. It
> looks like the compiler could not choose which overload (with
> String::pointer or String::iterator) to call when charT is simple char.
> This results in the error "<function> cannot be overloaded".

Right, I forgot that string::iterator and string::pointer are
the same type when debugging is disabled. Sorry about that.

> I've played with it and finally decided to make the begin method virtual
> and create three new template classes based on the ReplaceRangeOverload
> template, one per each pair of const and non-const iterators. The file
> with these changes is attached. May be there is some other (less
> complicated) way to help the gcc to resolve the ambiguity with iterator
> types. If so, I thnik we should switch to it, but verify that all
> compilers accept it before.

I think simply #ifdef'ing out one of the conflicting overloads when
_RWSTDDEBUG is not #defined will be easier.

> Also I noticed that both versions produce 600 asserts on Windows. I'll
> investigate their cause.

I see failing assertions on Linux as well (see the attachment). At
least some of the ones you are seeing will probably caused by but there may be
others as well.

Oher than failing assertions there is also a usability issue with
the tests exercising the range overloads: they can't be controlled
at the same level of granularity as the ordinary functions can using
the usual command line options. In fact, the usability issue would
also be behind some of the failed assertions if we were to enable
the tests exercising reverse_iterators because the result of the
replacement invoked with a reverse_iterator is different from the
result obtained with a regular forward iterator.

StringIds::ArgId defines one constant for each concrete type of
a function argument *except* for the range template. There we simply
have a range, regardless of whether the range is denoted by a couple
of pointers, string::iterators, or some other kind of iterators. That
doesn't allow us to cleanly distinguish one from the other. And it's
not a problem for any kinds of iterators that we use to exercise the
templates with *except* for reverse iterators.

I changed 21.strings.h and added an IteratorId member enum to StringIds
and a member of that type to the StringFunc struct. I've also started
adding code to 21.strings.cpp to handle this member
and21.string.replace.cpp to take advantage of it. All the changes are
incomplete and cannot be committed yet but they are attached so you can
see where I am. I plan to finish the whole thing tomorrow. Let me know
if you have any comments or suggestions.


  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message