incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Farid Zaripov" <Farid_Zari...@epam.com>
Subject RE: STDCXX tests fails and reasons [MSVC]
Date Tue, 24 Jul 2007 16:39:01 GMT
> -----Original Message-----
> From: Martin Sebor [mailto:sebor@roguewave.com] 
> Sent: Monday, July 23, 2007 6:46 PM
> To: stdcxx-dev@incubator.apache.org
> Subject: Re: STDCXX tests fails and reasons [MSVC]
> 
> >   Usually when rw_match() used for comparing the single characters, 
> > used rw_match (&c1, &c2, 1) form:
> 
> But that's the wrong way to do it.
> 
> The right (and easier) way to compare individual characters 
> of the same type is to use UserTraits::eq().

  But there compared not char vs char, but char vs charT where
charT is one of (char, wchar_t, UserChar). So we should use
UserTraits::eq() along with make_char():

  char exp; // expected value from StringTestCase
  charT res; // result value
  UserTraits<charT>::eq (make_char (exp), res);

Farid.

Mime
View raw message