Boost logo

Boost :

From: Sebastian Redl (sebastian.redl_at_[hidden])
Date: 2008-07-05 11:43:04

Boris wrote:
> Thanks for the link! I'm currently comparing the code and have already
> a question: There was a static constant defined in one class which has
> been changed by Julio to a static method (it had caused problems when
> the header was included in more than one compilation unit). Julio
> couldn't use the macro BOOST_STATIC_CONSTANT (see
> as on
> Windows a complex type is used which must be defined outside the
> class. While Julio simply defined a static method I had fixed the code
> with:
> #if defined(BOOST_POSIX_API) || defined(BOOST_PROCESS_DOXYGEN)
> #elif defined(BOOST_WINDOWS_API)
> #endif
> Is there any guideline what to prefer here?
Macros as constants are pretty much shunned. Worse, the two options here
have different behaviour if they're not on the global namespace. (And
also if they are, since the macro prevents all other uses of the name.)


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