Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-12-20 08:37:28

From: "Martin Schuerch" <mschuerch_at_[hidden]>
> To make it run, this declarations has to be outside boost::detail::winapi
> (My proposed solution isn't probably the best to achive this.).

To make it run on your specific configuration, you mean. :-)

> When the volatile is a problem, I can't see why it's only a problem when
> functions are declared global.

Because <windows.h> declares the same functions in the global namespace.
Since the functions are declared extern "C", overloading is not allowed, and
the declarations in winapi.hpp and windows.h must match. All compilers that
use the older windows.h (without the volatile) break when your fix is
applied. And it is not possible to detect which windows.h is being used, as
the user may have installed the platform SDK.

When the winapi.hpp declarations are in a namespace, they don't collide with
the global declarations in windows.h.

I can try to find a workaround, but I need an example that reproduces the
problem; I asked you to send one when you first mentioned the issue. I
haven't been able to create such an example myself.

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