Discussion:
[Parameter] Warnings from Preprocessor
(too old to reply)
Phillip Seaver
2017-01-27 14:52:52 UTC
Permalink
I recently updated to 1.63 from 1.57, and I'm now getting warnings from
usages of BOOST_PARAMETER_MEMBER_FUNCTION on Windows (msvc-12.0) like:

warning C4003: not enough actual parameters for macro
'BOOST_PP_SEQ_DETAIL_EMPTY_SIZE'
warning C4003: not enough actual parameters for macro
'BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY'

The code appears to be working, but since it's used in headers, I get a lot
of warnings. Here's one of the usages:

BOOST_PARAMETER_MEMBER_FUNCTION((Revision_t),
CreateForegroundWhite,
tag,
(optional
(imgclass, (Class_t), ClassPrint)
(fromimage, (bool), true)
(blackasgray, (bool), false)
))

Should I be concerned about the warnings? Any way to get rid of them?

Thanks,

Phillip
Edward Diener
2017-01-27 16:32:22 UTC
Permalink
Post by Phillip Seaver
I recently updated to 1.63 from 1.57, and I'm now getting warnings from
warning C4003: not enough actual parameters for macro
'BOOST_PP_SEQ_DETAIL_EMPTY_SIZE'
warning C4003: not enough actual parameters for macro
'BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY'
The code appears to be working, but since it's used in headers, I get a
BOOST_PARAMETER_MEMBER_FUNCTION((Revision_t),
CreateForegroundWhite,
tag,
(optional
(imgclass, (Class_t), ClassPrint)
(fromimage, (bool), true)
(blackasgray, (bool), false)
))
Should I be concerned about the warnings? Any way to get rid of them?
You need not be concerned about these warnings. I have made some changes
to Boost PP for the next release which may eliminate the above two
warnings, but in general the VC++ preprocessor often gives spurious
warnings of this kind which do not affect anything. The VC++ is not a
standard conforming C++ preprocessor in numerous ways.
Post by Phillip Seaver
Thanks,
Phillip
Phillip Seaver
2017-01-27 17:56:34 UTC
Permalink
Post by Edward Diener
Post by Phillip Seaver
I recently updated to 1.63 from 1.57, and I'm now getting warnings from
warning C4003: not enough actual parameters for macro
'BOOST_PP_SEQ_DETAIL_EMPTY_SIZE'
warning C4003: not enough actual parameters for macro
'BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY'
Should I be concerned about the warnings? Any way to get rid of them?
You need not be concerned about these warnings. I have made some changes
to Boost PP for the next release which may eliminate the above two
warnings, but in general the VC++ preprocessor often gives spurious
warnings of this kind which do not affect anything. The VC++ is not a
standard conforming C++ preprocessor in numerous ways.
Thanks for the quick response! Good to know they're not a problem. I'm
painfully aware of how problematic VC++ can be for cross-platform
developers. :-)

Phillip

Loading...