Boost logo

Boost :

Subject: Re: [boost] Clang 4.0.0 MPL error in Boost next.hpp and prior.hpp
From: Edward Diener (eldiener_at_[hidden])
Date: 2017-03-26 03:46:51


On 3/25/2017 4:37 PM, Peter Dimov via Boost wrote:
> Edward Diener wrote:
> On 3/25/2017 12:46 PM, Peter Dimov via Boost wrote:
>> > Well given that BOOST_PP_VARIADICS_MSVC=0 works at least some of the
>> > time and BOOST_PP_VARIADICS_MSVC=1 never works, it seems to me that
>> the > choice is a rather easy one and does not depend on any
>> predefined > macros.
>>
>> I am not sure what you are saying here:
>>
>> 1) Are you saying that turning off BOOST_PP_VARIADICS_MSVC for clang
>> targeting VC++ allows that compiler to work with BoostPP ?
>>
>> 2) Are you saying that turning off BOOST_PP_VARIADICS_MSVC for clang
>> targeting VC++, allows that compiler to work with BoostPP when
>> -fno-ms-compatibility is defined ?
>>
>> 3) 2) Are you saying that turning off BOOST_PP_VARIADICS_MSVC for
>> clang targeting VC++, allows clang/C2 to work with BoostPP when
>> -fno-ms-compatibility is defined ?
>
> I'm telling you 3)2), yes, at least for this simple MPL program I tested.

I meant to write "3)" and not "3)2)" above. Sorry !

Try running all the Boost PP tests <g>. I would be very surprised if
they worked in -fno-ms-compatibility mode. I will try it myself with
clang targeting VC++ using clang-win.

>
> If I could get b2 to work with Clang/C2, I would have run the tests, but
> I'm not sure I can do that.

Touche ! I am not sure whether to use clang ( clang-linux ) or
clang-win, but I am guessing the latter is the right match. Also I still
don't know how to invoke clang/C2. I will look in the VS2015/VS2017
directory structure unless you know what it is called and where it is ?

>
> I'm also telling you that since BOOST_PP_VARIADICS_MSVC=1 never works
> with any Clang, there is perhaps no reason to ever set it to 1
> regardless of what Clang it is and what options have been defined.

Well I can change config.hpp to reflect that. Ideally if clang targeting
VC++ actually emulated the VC++ non-standard preprocessor perfectly
BOOST_PP_VARIADICS_MSVC=1 would absolutely have to be defined in order
for clang targeting VC++ to work properly with Boost PP. That is the
obvious reason why it has been used in that situation.


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