Boost logo

Boost :

From: Rene Rivera (grafik.list_at_[hidden])
Date: 2004-07-19 09:22:47


Vladimir Prus wrote:

> Rene Rivera wrote:
>
>>Perhaps the intent was to place the entire thing inside some namespace
>>and hence the mbstate_t would not collide?
>
> The story with program_options is simple. Initially it used std::mbstate_t and
> had
>
> namespace std {
> using ::mbstate_t;
> }
>
> for broken compilers. Later, Pavel reported that this does not work with his
> version of borland. For unknown reason, changing std::mbstate_t to just
> mbstate_t fixes those failures. That's why program_options now has mbstate_t
> in global scope.

Yes. But did anyone try other non intrusive approaches? Here are some
possibilities:

namespace std {
typedef ::mbstate_t mbstate_t;
}

namespace boost { namespace detail {
using ::mbstate_t;
} }

namespace boost { namespace detail {
typedef ::mbstate_t mbstate_t;
} }

namespace boost { namespace detail {
struct mbstate_t_workaround
{
        typedef ::mbstate_t mbstate_t;
};
} }

etc...

-- 
-- Grafik - Don't Assume Anything
-- Redshift Software, Inc. - http://redshift-software.com
-- rrivera/acm.org - grafik/redshift-software.com - 102708583/icq

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