Boost logo

Boost Users :

Subject: Re: [Boost-users] [scope_exit] 1.57 MSVC C4003 warning
From: Edward Diener (eldiener_at_[hidden])
Date: 2014-11-07 16:51:35


On 11/7/2014 1:42 PM, Filip Konvička wrote:
>>> Is BOOST_PP_VARIADICS enabled by mistake for MSVC (especially 2013)?
>>> Should I explicitly set BOOST_PP_VARIADICS=0 for MSVC?
>> We've been using boost extensively in our project for years, the Boost
>> Preprocessor library as well,
>> BOOST_SCOPE_EXIT, too, and we have BOOST_PP_VARIADICS=1, and everything
>> works like a charm.
>> We use the VS2010 C++ compiler.
> Same here, except that after upgrading to 1.57 from 1.56 the warning
> appeared. I should have mentioned that, sorry.
>
> I haven't tested VS2010, we're mostly using VS2012 Update4 and VS2013
> Update3 at the moment. There does not seem to be a problem with g++.

This is a result of an update I made to Boost PP for VC++ to handle
possibly "empty" tuples, which fixes a corner case error in the VC++
non-standard conforming preprocessor. The warning is benign, but I have
found no way to turn it off at the Boost PP level.

A possible workaround for the next release, which I will try, is to
duplicate BOOST_PP_EXPAND under a different internal name and use that
duplicated macro internally and see if I can turn off the warning there.
Unfortunately if I surround the invocation of the currently internal use
of BOOST_PP_EXPAND with the appropriate #pragma to disable the warning
VC++ ignores it.


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