Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 39065 invoked from network); 8 Jun 2006 15:21:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 8 Jun 2006 15:21:32 -0000 Received: (qmail 53872 invoked by uid 500); 8 Jun 2006 15:21:32 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 53816 invoked by uid 500); 8 Jun 2006 15:21:32 -0000 Mailing-List: contact stdcxx-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: stdcxx-dev@incubator.apache.org Delivered-To: mailing list stdcxx-dev@incubator.apache.org Received: (qmail 53805 invoked by uid 99); 8 Jun 2006 15:21:31 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Jun 2006 08:21:31 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of AntonP@moscow.vdiweb.com designates 195.210.189.132 as permitted sender) Received: from [195.210.189.132] (HELO mail.moscow.vdiweb.com) (195.210.189.132) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Jun 2006 08:21:30 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: svn commit: r412249 - in /incubator/stdcxx/trunk/tests: include/21.strings.h src/21.strings.cpp Date: Thu, 8 Jun 2006 19:21:07 +0400 Message-ID: <4D6A8407B7AC6F4D95B0E55C4E7C4C62045BCE4E@exmsk.moscow.vdiweb.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: svn commit: r412249 - in /incubator/stdcxx/trunk/tests: include/21.strings.h src/21.strings.cpp Thread-Index: AcaKezO+7KFUkMIWTkKY5JCakMWqVAAkan1Q From: "Anton Pevtsov" To: X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Martin Sebor wrote: > I think this would be an overall improvement to the class so with the change above please go ahead and commit. Committed here: http://svn.apache.org/viewvc?rev=3D412750&view=3Drev Now I am applying the same changes to the cons test. Martin Sebor wrote: > You mean make the derived class virtual operator() call append, [...] > this design would expose us to the problem I'm trying to prevent. Ok, I see. I think we may leave the design as is at this time.=20 But there is a problem with reverse iterators. It looks like we should provide special resulting sequence for them. What do you think about this? Thanks, Anton Pevtsov. -----Original Message----- From: Martin Sebor [mailto:sebor@roguewave.com]=20 Sent: Thursday, June 08, 2006 01:41 To: stdcxx-dev@incubator.apache.org Subject: Re: svn commit: r412249 - in /incubator/stdcxx/trunk/tests: include/21.strings.h src/21.strings.cpp Anton Pevtsov wrote: > Martin, I suggest to move the common to all range overlodas for=20 > different methods code to the 21.strings.h I think we may have=20 > RangeBase class with begin methods and virtual operator (). > Here are the changes to the tests which use this approach: > http://people.apache.org/~antonp/stdcxx06072006/ I agree, it's a good idea to move the base class to a common header. The only thing that needs to change if we do that is that we will either need #include in that header to bring in the declaration of basic_string, or replace it with just String. I.e., change RangeBase to template struct RangeBase { ... }; I think this would be an overall improvement to the class so with the change above please go ahead and commit. >=20 > The rest of the code in classes which exrcise range methods look=20 > similar too. So it is possible to join them and use the func_id to=20 > determine which of the string methods should be called. What do you=20 > think about this? You mean make the derived class virtual operator() call append, assign, insert, erase, or insert based on func_id and move the whole thing to the header as well? My philosophy of where to draw the line between how much code to move into the driver and how much to leave in each test has been driven by the desire to prevent failures across all or many tests caused by problems in a library component that should not otherwise affect them. For example, if basic_string::insert() had a bug that prevented it from compiling that bug should not cause compilation errors in tests exercising other template members. Since merging all the derived classes into one would cause the instantiation of calls to all members referenced in the derived class operator() this design would expose us to the problem I'm trying to prevent. Martin