
-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Andy Little
"Paul Mensonides" <pmenso57@comcast.net> 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'. Regards, Paul Mensonides