Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 69670 invoked from network); 5 Apr 2007 15:28:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Apr 2007 15:28:37 -0000 Received: (qmail 36032 invoked by uid 500); 5 Apr 2007 15:28:44 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 36018 invoked by uid 500); 5 Apr 2007 15:28:44 -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 36006 invoked by uid 99); 5 Apr 2007 15:28:44 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Apr 2007 08:28:44 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [208.30.140.160] (HELO moroha.quovadx.com) (208.30.140.160) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Apr 2007 08:28:37 -0700 Received: from qxvcexch01.ad.quovadx.com ([192.168.170.59]) by moroha.quovadx.com (8.13.6/8.13.6) with ESMTP id l35FRIr2019374 for ; Thu, 5 Apr 2007 15:27:18 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: ctype index? Date: Thu, 5 Apr 2007 09:27:09 -0600 Message-ID: In-Reply-To: <4614349E.8030202@roguewave.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: ctype index? Thread-Index: Acd3EQr/Lg3AoFl0Sk6ajZXue8ElnwAha1lw References: <4614349E.8030202@roguewave.com> From: "Scott Zhong" To: X-Virus-Checked: Checked by ClamAV on apache.org Right now it is comparing pointer addresses? __lo and __hi are pointers and the operation < for(; __lo < __hi; ++__lo; ++__hi) > would step through until the memory address __lo is greater than or equal to __hi? Yu (Scott) Zhong Consulting Engineer Rogue Wave Software, a Quovadxtm division scottz@roguewave.com ph: 303 545 3182 =20 -----Original Message----- From: Martin Sebor [mailto:sebor@roguewave.com]=20 Sent: Wednesday, April 04, 2007 5:29 PM To: stdcxx-dev@incubator.apache.org Subject: Re: ctype index? Scott Zhong wrote: > in the for loop, why __lo char_type length isn't being tested? I'm not sure what you mean. What length isn't being tested and why should it be? Martin >=20 > in _ctype.cc line 141: >=20 > template > /* virtual */ const _TYPENAME ctype<_CharT>::char_type* > ctype<_CharT>:: > do_narrow (const char_type *__lo, const char_type *__hi, > char __dfault, char *__dest) const > { > _RWSTD_ASSERT (__lo <=3D __hi); > _RWSTD_ASSERT (!__lo || __dest); >=20 > for (; __lo < __hi; ++__lo, ++__dest) > *__dest =3D narrow (*__lo, __dfault); >=20 > return __hi; > } >=20 >=20 > Yu (Scott) Zhong >=20 >=20