Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2004-07-18 00:08:22

"Robert Ramey" <ramey_at_[hidden]> writes:

>>And then you go ahead to use an unqualified mbstate_t. This just doesn't
>>work for CW. And I don't see how this would work for any library runtime
>>that puts mbstate_t only in the std namespace. Could you explain what
>>your intent is for this?
> The situation with mbstate_t is problematic. Some compilers define it in
> the global namespace while others define it in std::mbstate_t. The intent
> is to permit the code to use mbstate_t without qualification for those
> compilers that don't define it as std::mbstate_t. This sort of grew one
> compiler at time without too much thought. The typedef ::mbstate_t
> mbstate_t makes me wonder what I was thinking. Following the logic here for
> CW this would add
> #elif defined(CW)
> using std::mbstate_t;
> so that the rest of the code could use unqualified mbstate_t .

Seems wrong; standard is that it's only in std:: if you're not
including any of the <xxx.h> headers. You ought to look for it there
by default and only pluck it from the global namespace on
implementations that you know to be nonconforming in this regard.
Same with size_t.

Dave Abrahams
Boost Consulting

Boost list run by bdawes at, gregod at, cpdaniel at, john at