Boost logo

Boost :

From: Jonathan Wakely (cow_at_[hidden])
Date: 2004-08-10 10:33:32


> "Ralf W. Grosse-Kunstleve" <rwgk_at_[hidden]> writes:
>
> > --- Gennadiy Rozental <gennadiy.rozental_at_[hidden]> wrote:
> >
> >> cxx: Error:
> >> /net/redbelly/scratch1/rwgk/boost_regression/boost/boost/test/detail/basic_c
> >> string/compare.hpp, line 42: #40
> >> expected an identifier
> >> static bool eq( CharT c1, CharT c2 ) { return std::toupper( c1 )
> >> == std::toupper( c2 ); }
> >> ---------------------------------------------------------------^
> >>
> >> How should deal with this one?
> >
> > This output is from our machine. I could try to fix it if someone gives me a
> > little assistance.
> >
> > My first guess is that #include <ctypes> has to be added somewhere.

Is it possible that <cctype> has been included, but that unless
"-std strict_ansi" switch is given then the toupper/tolower functions
are not in the std namespace?

I've had problems porting to Tru64's cxx compiler because with
strict_ansi it's very strict about what's in std (no ::size_t for
instance) and IIRC without strict_ansi it's quite sloppy (so entirely
possible that toupper/tolower are only in global, not std namespace)

As I understand it, "cxx" and "cxx -std strict_ansi" are effectively two
different compilers, with differing effects from including the standard
headers, and entirely different IOStream implementations for instance.

N.B. this is all based on bug reports I've received from cxx users, not
first-hand experience.

jon

-- 
"The easy confidence with which I know another man's religion is Folly
 leads me to suspect that my own is also."
	- Mark Twain

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk