Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 10877 invoked from network); 6 May 2006 15:19:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 6 May 2006 15:19:13 -0000 Received: (qmail 46467 invoked by uid 500); 6 May 2006 15:19:12 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 46443 invoked by uid 500); 6 May 2006 15:19:12 -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 46429 invoked by uid 99); 6 May 2006 15:19:12 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 06 May 2006 08:19:11 -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; Sat, 06 May 2006 08:19:10 -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: test for lib.string.access Date: Sat, 6 May 2006 19:18:46 +0400 Message-ID: <4D6A8407B7AC6F4D95B0E55C4E7C4C62042A18F3@exmsk.moscow.vdiweb.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: test for lib.string.access Thread-Index: AcZvhMwjDHUhCDxIQBavWQqj/H+GPQBmNfbg 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 The ported test is here: http://people.apache.org/~antonp/stdcxx05062006/ Thanks, Anton Pevtsov -----Original Message----- From: Anton Pevtsov [mailto:AntonP@moscow.vdiweb.com]=20 Sent: Thursday, May 04, 2006 18:13 To: stdcxx-dev@incubator.apache.org Subject: test for lib.string.access I am porting the test for lib.string.access methods (operator[] and at) and found one issue. The code=20 #include int main (void) { std::string s ("a", 1); const char& c =3D s[1]; return 0; } results in assertion and fails. But the standard says for=20 const_reference operator[] (size_type pos) const: "If pos < size() returns data()[pos]. Otherwise, if pos =3D=3D size(), = the const version returns charT(). Otherwise, the behavior is undefined." So I expect charT() without any asserts. What do you think about this? Thanks, Anton Pevtsov.