Boost logo

Boost Users :

Subject: Re: [Boost-users] [config] disabling _MSC_EXTENSIONS disables win32
From: John Maddock (john_at_[hidden])
Date: 2009-11-11 08:28:53


> In visualc.hpp I found the following:
>
> #if !defined(_MSC_EXTENSIONS) && !defined(BOOST_DISABLE_WIN32)
> # define BOOST_DISABLE_WIN32
> #endif
>
> I.e., disabling MSVC-specific exnetions (/Za) disables also WIN32,
> which, in turn, leads to undefined BOOST_WINDOWS.
> So if I try to compile my project with /Za, nothing compiles, because
> there're lot of places where BOOST_WINDOWS is used to select
> platform-dependant implementation (eg., in ASIO).
> But if I understand correctly, the purpose of disabling MSVC
> *language* extenstions is to ensure that the code is portable &
> standard-complient. So it seems to be incorrect to imply from this
> BOOST_DISABLE_WIN32.

The point is that with /Za you can't #include windows.h or use any platform
specific features, so that makes it very hard (impossible?) to compile code
that is binary compatible between /Za and not /Za. I realize there are
exceptions to this - particularly for libraries where the implementation is
confined to an external binary - but given that most of Boost is header
only, what did you expect?

Regards, John


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net