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 06:34:57


On 3/25/2017 6:48 PM, Peter Dimov via Boost wrote:
>> > So, Clang/C2 can't link for some reason.
>>
>> It occurred to me that the PP tests don't need to link. So,
>>
>> ...failed updating 25 targets...
>> ...skipped 26 targets...
>> ...updated 118 targets...
>
> This is with
>
> C:\Projects\boost-git\boost\libs\preprocessor>git diff
> diff --git a/include/boost/preprocessor/config/config.hpp
> b/include/boost/prepro
> index 4801903..10778d8 100644
> --- a/include/boost/preprocessor/config/config.hpp
> +++ b/include/boost/preprocessor/config/config.hpp
> @@ -79,7 +79,7 @@
> # elif defined _MSC_VER && _MSC_VER >= 1400 && (defined(__clang__) ||
> !defin
> # define BOOST_PP_VARIADICS 1
> # undef BOOST_PP_VARIADICS_MSVC
> -# define BOOST_PP_VARIADICS_MSVC 1
> +# define BOOST_PP_VARIADICS_MSVC 0
> # /* Wave (C/C++), GCC (C++) */
> # elif defined __WAVE__ && __WAVE_HAS_VARIADICS__ || defined __GNUC__
> && def
> # define BOOST_PP_VARIADICS 1
> @@ -94,7 +94,7 @@
> # define BOOST_PP_VARIADICS 1
> # if defined _MSC_VER && _MSC_VER >= 1400 && (defined(__clang__) ||
> defined(
> # undef BOOST_PP_VARIADICS_MSVC
> -# define BOOST_PP_VARIADICS_MSVC 1
> +# define BOOST_PP_VARIADICS_MSVC 0
> # endif
> # else
> # undef BOOST_PP_VARIADICS

I have updated Boost PP on the develop branch to support the
-fno-ms-compatibility mode of clang targeting VC++ or clang/C2. I still
get plenty of errors with clang 4.0 using clang-win and
-fno-ms-compatibility when running the Boost PP tests, but maybe it is
good enough for MPL although I highly doubt even in that case it would
be good enough for all the other Boost libraries that use Boost PP.

As I have expressed in the past this is a miasma created by the clang
team trying to accomodate Microsoft and VC++, as well as Microsoft
wanting to use clang and their hybridized and buggy VC++ like preprocessor.

This would have all been avoided if Microsoft had not created their own
non-standard C++ preprocessor and held onto it for over a quarter of a
century.


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