Boost logo

Boost :

Subject: Re: [boost] [clang] How to use CLang for Windows?
From: Edward Diener (eldiener_at_[hidden])
Date: 2013-09-29 22:07:24

On 9/29/2013 9:13 PM, Beman Dawes wrote:
> On Sun, Sep 29, 2013 at 8:36 PM, Edward Diener <eldiener_at_[hidden]>wrote:
>> There are other cases in the Boost header files that assume that when
>> _MSC_VER is defined the compiler is VC++ ( see my thread "Boost and clang
>> under Windows" ) without checking if it could be another compiler emulating
>> VC++.
> But that is a mistake. BOOST_MSVC has been the preferred macro to check for
> VC++ since September of 2001. Since even before then there have been
> non-Microsoft compilers that define _MSC_VER.

The Boost PP config.h file was created by Paul Mensonides. Boost PP does
not use the Boost.Config library or any other Boost library, so using
BOOST_MSVC is not possible. You need to talk to Paul about his reasons
and design. I am just trying to "fix" the Boost PP library so that clang
on Windows works there.

The reality is that a number of other Boost libraries use _MSC_VER
instead of BOOST_MSVC in order to check for VC++ emulation. In some of
those other libraries further checks are done to detect which actual
compiler is using _MSC_VER and different code is often invoked in that
case. But naturally there are no further checks for clang, since clang
under Windows with _MSC_VER defined is "new".

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