Boost logo

Boost :

From: Paul Mensonides (pmenso57_at_[hidden])
Date: 2005-10-22 02:48:29

> -----Original Message-----
> From: boost-bounces_at_[hidden]
> [mailto:boost-bounces_at_[hidden]] On Behalf Of Andy Little

> "Paul Mensonides" <pmenso57_at_[hidden]> wrote
> > more-or-less equivalent. The great strength of the macro
> version is
> > the support for arbitrary bit groupings.
> Might be an idea to remind of macro weakneses
> * Macro doesnt respect namespaces.

The macro is namespace prefixed--specifically 'BOOST_'. For all intents and
purposes (i.e. categorizing, interfacing, and avoiding collision), 'BOOST_NAME'
is equivalent to saying 'boost::name'.

> * Macro can be redefined

That would violate the contract that Boost has with its users. Unless
explicitly specified as otherwise for a particular case in the documentation,
the namespace ::boost and any name prefixed with BOOST_ is unilaterally reserved
by Boost. Besides, we don't need to protect against intentional misuse.

> * Macro is global

So is '::boost::name', that is, it is just as globally accessible. Sure, 'name'
in '::boost::name' isn't global, but neither is 'NAME' in 'BOOST_NAME'.

Paul Mensonides

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