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 [EMAIL PROTECTED] ph: 303 545 3182 -----Original Message----- From: Martin Sebor [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 04, 2007 5:29 PM To: [email protected] 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 > > in _ctype.cc line 141: > > template <class _CharT> > /* 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 <= __hi); > _RWSTD_ASSERT (!__lo || __dest); > > for (; __lo < __hi; ++__lo, ++__dest) > *__dest = narrow (*__lo, __dfault); > > return __hi; > } > > > Yu (Scott) Zhong > >
