[C++-sig] Is there a 15-parameter limit for function definitions in Python.Boost?

Igor Lapshin igor at pcigeomatics.com
Mon Sep 13 20:54:15 CEST 2004


Hi all, 

 

I'm trying to expose several functions with quite impressive number of
arguments: 20-35(!) :-( 

 

I found that after 15 arguments compiler starts produce errors:

 

C:\Boost\include\boost-1_31\boost\python\make_function.hpp(77) : error
C2780:
'boost::mpl::vector17<RT,most_derived<Target,ClassT>::type&,T0,T1,T2,T3,
T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14>
boost::python::detail::get_signature(RT (__thiscall ClassT::*
)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14) volatile
const,Target *)' : expects 2 arguments - 1 provided

        C:\Boost\include\boost-1_31\boost\python\signature.hpp(165) :
see declaration of 'boost::python::detail::get_signature'

        C:\Boost\include\boost-1_31\boost\python\make_function.hpp(130)
: see reference to function template instantiation
'boost::python::api::object
boost::python::detail::make_function_dispatch<int(__cdecl *)(const
std::string &,const std::string
&,boost::python::list,boost::python::list,const std::string &,const
std::string &,const std::string &,const std::string &,const std::string
&,boost::python::list,boost::python::list,const std::string
&,boost::python::list,const std::string
&,boost::python::list,boost::python::list),CallPolicies,KeywordsOrSignat
ure>(F,const CallPolicies &,const Keywords &,boost::mpl::true_)' being
compiled

        with

        [

 
CallPolicies=boost::python::detail::tuple_extract_impl<false>::apply<boo
st::python::detail::def_helper<const char
[60]>::all_t,boost::mpl::lambda_impl<boost::mpl::and_<boost::mpl::not_<b
oost::is_same<const boost::python::detail::not_specified
&,boost::mpl::_1>>,boost::python::detail::is_reference_to_class<boost::m
pl::_1>,boost::mpl::not_<boost::python::detail::is_reference_to_keywords
<boost::mpl::_1>>>,boost::mpl::void_,boost::mpl::true_>::type>::result_t
ype,

 
KeywordsOrSignature=boost::python::detail::tuple_extract_impl<false>::ap
ply<boost::python::detail::def_helper<const char
[60]>::all_t,boost::mpl::lambda_impl<boost::python::detail::is_reference
_to_keywords<boost::mpl::_1>,boost::mpl::void_,boost::mpl::true_>::type>
::result_type,

            F=int (__cdecl *)(const std::string &,const std::string
&,boost::python::list,boost::python::list,const std::string &,const
std::string &,const std::string &,const std::string &,const std::string
&,boost::python::list,boost::python::list,const std::string
&,boost::python::list,const std::string
&,boost::python::list,boost::python::list),

 
Keywords=boost::python::detail::tuple_extract_impl<false>::apply<boost::
python::detail::def_helper<const char
[60]>::all_t,boost::mpl::lambda_impl<boost::python::detail::is_reference
_to_keywords<boost::mpl::_1>,boost::mpl::void_,boost::mpl::true_>::type>
::result_type

        ]

 

 

Is it some limit? Is there any way to increase it?

 

Thanks,

Igor 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20040913/bc6207aa/attachment.htm>


More information about the Cplusplus-sig mailing list