Boost logo

Boost :

From: Boris (boriss_at_[hidden])
Date: 2008-07-05 10:52:02


On Sat, 05 Jul 2008 15:11:59 +0200, Darren Garvey
<darren.garvey_at_[hidden]> wrote:

> [...]The most recent code by Julio is in the boost sandbox:
>
> *http://preview.tinyurl.com/6qsg4z*
>
> I'm glad you've picked this up because it's a really useful library.

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
http://www.boost.org/development/int_const_guidelines.html) 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)
BOOST_STATIC_CONSTANT(handle_type, INVALID_VALUE = -1);
#elif defined(BOOST_WINDOWS_API)
# define INVALID_VALUE INVALID_HANDLE_VALUE
#endif

Is there any guideline what to prefer here?

Boris


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