"Duane" <spoo@zowie_flarn.com> wrote in message
news:J34pc.78413$FH5.1747411@news20.bellglobal.com ...
[color=blue]
> "P.J. Plauger" <pjp@dinkumware.com> wrote in message
> news:bW3pc.194725$L31.120616@nwrddc01.gnilink.net. ..
> <snip>[color=green]
> > V6 does not put C library names in namespace std when it
> > should, due to compiler limitations. Fixed with later
> > versions of VC++.[/color]
>
> Thanks. We're moving from Borland to MSVC7.1 which (I
> believe) uses your libraries.
>
> I would still like to know what the correct way to call
> this should be according to the standard.
> From the dinkumware help I get:
>
> template<class Elem>
> Elem toupper(Elem ch, const locale &loc);
>
>
> Given this, I don't really see how any of my examples
> could be correct (except to use ctypes.h)
>
> The second arg here is a const reference so BCC's
> accepting toupper(char) doesn't seem correct.
> But neither does Comeaux's accepting
> toupper(char, std::locale(0));
> as in this case, the second arg should be
> a temporary.
>
> At any rate, what does the standard say about this?[/color]
You should be able to write std::toupper('x', std::locale()),
but that should also be the same as toupper('x'). The
default locale constructor should mirror the global locale.
P.J. Plauger
Dinkumware, Ltd.
http://www.dinkumware.com