I'm using VC++ Express with Boost 1.34.0. Everytime I defined BOOST_PARAMETER_FUNCTION with >5 parameters I got this error:

d:\project\basic\param\param.cpp(30) : error C2977: 'boost::parameter::parameters' : too many template arguments

        d:\library\boost\parameter\parameters.hpp(924) : see declaration of 'boost::parameter::parameters'
        d:\project\basic\param\param.cpp(30) : see reference to class template instantiation 'boost_param_params_30Func<BoostParameterDummy>' being compiled
d:\project\basic\param\param.cpp(30) : error C2955: 'boost::parameter::parameters' : use of class template requires template argument list
        d:\library\boost\parameter\parameters.hpp(924) : see declaration of 'boost::parameter::parameters'
d:\project\basic\param\param.cpp(30) : error C2977: 'boost::parameter::aux::argument_pack' : too many template arguments
        d:\library\boost\parameter\preprocessor.hpp(153) : see declaration of 'boost::parameter::aux::argument_pack'
d:\project\basic\param\param.cpp(30) : error C2977: 'boost::parameter::aux::match' : too many template arguments
        d:\library\boost\parameter\preprocessor.hpp(97) : see declaration of 'boost::parameter::aux::match'
d:\project\basic\param\param.cpp(30) : error C2039: 'type' : is not a member of 'boost::parameter::aux::match'
        d:\library\boost\parameter\preprocessor.hpp(97) : see declaration of 'boost::parameter::aux::match'
d:\project\basic\param\param.cpp(30) : error C2146: syntax error : missing ',' before identifier 'boost_parameter_enabler_argument'
d:\project\basic\param\param.cpp(30) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
d:\project\basic\param\param.cpp(30) : error C2059: syntax error : ')'
d:\project\basic\param\param.cpp(30) : error C2143: syntax error : missing ')' before '<end Parse>'

My test code is this:
int func(int , int , int , int , int , int )
{
    return 0;
}

BOOST_PARAMETER_NAME(arg1)
BOOST_PARAMETER_NAME(arg2)
BOOST_PARAMETER_NAME(arg3)
BOOST_PARAMETER_NAME(arg4)
BOOST_PARAMETER_NAME(arg5)
BOOST_PARAMETER_NAME(arg6)
BOOST_PARAMETER_NAME(arg7)
BOOST_PARAMETER_NAME(arg8)

BOOST_PARAMETER_FUNCTION(
                         (int),
                         Func,
                         tag,
                         (required(arg1,(int))
                            (arg2,(int))
                            (arg3,(int))
                            (arg4,(int))
                            (arg5,(int)) )
                            (optional(arg6,(int),0) )
                         )
{
    return func(arg1, arg2, arg3, arg4, arg5, arg6);
}

If I reduce the number of arguments in BOOST_PARAMETER_FUNCTION like this:

BOOST_PARAMETER_FUNCTION(
                         (int),
                         Func,
                         tag,
                         (required(arg1,(int))
                            (arg2,(int))
                            (arg3,(int))
                            (arg4,(int))  )
                            (optional(arg6,(int),0) )
                         )
{
    return func(arg1, arg2, arg3, arg4, 0, arg6);
}

then it's compiled just fine. Any idea how to fix this ?


Moody friends. Drama queens. Your life? Nope! - their life, your story.
Play Sims Stories at Yahoo! Games.