Return-Path: Delivered-To: apmail-stdcxx-dev-archive@www.apache.org Received: (qmail 92333 invoked from network); 9 Jul 2008 18:28:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Jul 2008 18:28:04 -0000 Received: (qmail 72299 invoked by uid 500); 9 Jul 2008 18:28:05 -0000 Delivered-To: apmail-stdcxx-dev-archive@stdcxx.apache.org Received: (qmail 72288 invoked by uid 500); 9 Jul 2008 18:28:04 -0000 Mailing-List: contact dev-help@stdcxx.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@stdcxx.apache.org Delivered-To: mailing list dev@stdcxx.apache.org Received: (qmail 72277 invoked by uid 99); 9 Jul 2008 18:28:04 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Jul 2008 11:28:04 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [208.30.140.160] (HELO moroha.roguewave.com) (208.30.140.160) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Jul 2008 18:27:13 +0000 Received: from exchmail01.Blue.Roguewave.Com (exchmail01.blue.roguewave.com [10.22.129.22]) by moroha.roguewave.com (8.13.6/8.13.6) with ESMTP id m69IRXN2029563 for ; Wed, 9 Jul 2008 18:27:33 GMT 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: r675044 - in /stdcxx/branches/4.3.x: include/rw/_tuple.h include/tuple tests/utilities/20.tuple.cnstr.cpp tests/utilities/20.tuple.creation.cpp tests/utilities/20.tuple.h tests/utilities/20.tuple.helpers.cpp Date: Wed, 9 Jul 2008 12:27:37 -0600 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: svn commit: r675044 - in /stdcxx/branches/4.3.x: include/rw/_tuple.h include/tuple tests/utilities/20.tuple.cnstr.cpp tests/utilities/20.tuple.creation.cpp tests/utilities/20.tuple.h tests/utilities/20.tuple.helpers.cpp Thread-Index: AcjhUHjBx2jJV/psQR+A5lb/aX/PGwAAbPOAACScKSAAAvmE4A== References: <20080708231336.C38872388A22@eris.apache.org> From: "Travis Vitek" To: X-Virus-Checked: Checked by ClamAV on apache.org =20 Eric Lemings wrote: > >> Travis Vitek wrote: >> >> >Modified:=20 >stdcxx/branches/4.3.x/tests/utilities/20.tuple.creation.cpp >... >> >+ rw_assert (0 =3D=3D std::strcmp (s, "string"), __FILE__, = __LINE__, >> >+ "s =3D=3D \"string\", got false, expected true"); >>=20 >> The tuple is holding the original pointer (not a copy), so I=20 >think you >> can check the actual pointer here. > >True. But if that assumption became invalid for whatever reason, the >code above would still work. > >Assumptions are bad. Robustness is good. :) As I see it, the tuple implementation is required to hold a copy of an object of the specified type (const char* in this case). If you don't verify the value held is indeed a copy, you are not actually verifying the requirements. This is wrong, and wrong is much worse than bad. :) > >Brad. >