Boost logo

Boost :

Subject: Re: [boost] [pool] detail/mutex.hpp may include windows.h and pollute namespace with windows definitions.
From: Paul Blampspied (elpidiovaldez5_at_[hidden])
Date: 2010-10-11 13:13:55


Thanks to all responders for the information. Conclusion is that it is
possible to rely on the size and alignment of CRITICAL_SECTION not changing.

I have to implement this edit to the library for my own purposes, as
windows.h is conflicting with too much code (including other libraries which
I do not want to modify). Ray's point about MIN and MAX macros is well
taken. These macros caused me problems too. I did not mention them because
it is possible to avoid by defining NOMINMAX in the project file.

The Boost documentation does say that the use of Windows critical sections
is an interim measure pending a portable Boost implementation of equivalent
features. This means that it may not be worth making any changes to the
library until the job can be done properly. I suspect this won't be too
long as Boost has recently increased it's portable support for thread
synchronisation.

regards,
Paul


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