On 3/10/2015 1:54 AM, Damien Buhl wrote:
On 09/03/2015 23:20, Edward Diener wrote:
On 3/9/2015 5:09 PM, Andrey Semashev wrote: [...]
There weren't any warnings before. Is this a result of a change in Boost.PP?
Yes, but they were already in 1.57. The changes added some new (BOOST_PP_IS_BEGIN_PARENS) and better functionality (the internal BOOST_PP_IS_EMPTY) to Boost PP, as well as fixing some corner cases with VC++ I discovered when testing VMD.
The reason why this happens more in this build, is that the new BOOST_FUSION_ADAPT macros uses BOOST_PP_IS_EMPTY for each field member now. This is used to determine if the type was provided or has to be deduced.
In all the test I ran I got no warning under VC++, but this was on a pretty new version. And some of my test were run before 1.57.
The BOOST_PP_IS_EMPTY macro is undocumented in Boost PP and therefore was not meant to be used outside the library. I actually changed it to be much more reliable when using variadic macros, but unfortunately that mean that VC++ puts out more spurious warning messages. Honestly just getting VC++ to work properly in Boost PP and VMD is hard enough. Fixing VC++ warning messages, when there is nothing wrong, is nearly impossible. I understand they are irritating but they are totally false also. They are part of VC++'s non-conformant C++ preprocessor.
Turning off C4003 globally for VC++ is the only solution to the VC++ warnings I could ever discover. I attempted to turn off the warnings in the macros where they occur, but VC++ just ignores that. Evidently the warnings can only be turned off globally or possibly at the very top-level macro which eventually causes them.
Do you think I could add specific pragmas to disable C4003 where I use BOOST_PP_IS_EMPTY ?
You can try it by surrounding the top-level macro, which eventually calls BOOST_PP_EMPTY, with the appropriate VC++ pragmas to turn off the warning. But even that may not work with VC++. I tried to use the appropriate VC++ pragmas at the Boost PP level to turn off the warnings but it did not succeed.