Boost logo

Boost :

From: Jonathan Turkanis (technews_at_[hidden])
Date: 2004-03-04 17:16:53


When I compile the following simple program on VC6:

    #include <boost/preprocessor/facilities/empty.hpp>
    #include <boost/preprocessor/punctuation/comma_if.hpp>

    #define PARAM(has_param) BOOST_PP_IF(has_param, typename Param,
BOOST_PP_EMPTY())
    #define MACRO(has_param)
\
        template< PARAM(has_param) BOOST_PP_COMMA_IF(has_param)
typename T> \
        struct name { };
\
        /**/

    MACRO(0)

    int main() { return 0; }

I get the following warnings:

    warning C4003: not enough actual parameters for macro
'BOOST_PP_IIF'
    warning C4003: not enough actual parameters for macro
'BOOST_PP_IIF_I'
    warning C4003: not enough actual parameters for macro
'BOOST_PP_IIF_0'

It works fine on other compilers.

Am I missusing the preprocessor library, or is this a problem with
VC6? If the latter, is there a workaround, or should I just turn off
warning 4003?

Jonathan


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