[scope_exit] 1.57 MSVC C4003 warning
Hi,
Any use of BOOST_SCOPE_EXIT in 1.57 seems to emit warning C4003 on MSVC
2012 and 2013:
warning C4003: not enough actual parameters for macro 'BOOST_PP_EXPAND_I'
Uncomment either line to suppress the warning.
Is BOOST_PP_VARIADICS enabled by mistake for MSVC (especially 2013)?
Should I explicitly set BOOST_PP_VARIADICS=0 for MSVC?
Despite the warning, the code appears to work fine (i.e., the block of
code gets properly called).
Thanks,
Filip
#include
Hi,
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.
- ch0kee
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++. Thanks, Filip
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.
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.
Thanks Edward. At least I know it's not in our code. So I assume that for now it's best to disable the warning at the top level if we want to get rid of it. Cheers, Filip
On 11/10/2014 4:05 AM, Filip Konvička wrote:
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.
Thanks Edward. At least I know it's not in our code. So I assume that for now it's best to disable the warning at the top level if we want to get rid of it.
Yes. This appears the only way to disable it. If I find some way to disable it at the Boost PP level I will do it, but it does not appear to be possible.
participants (3)
-
ch0kee
-
Edward Diener
-
Filip Konvička