Boost Python - Limits to the number of arguments when wrapping a function

Posted by Derek on Stack Overflow See other posts from Stack Overflow or by Derek
Published on 2011-11-28T17:48:42Z Indexed on 2011/11/28 17:50 UTC
Read the original article Hit count: 389

Filed under:

I'm using Boost Python to wrap some C++ functions that I've created. One of my C++ functions contains 22 arguments. Boost complains when I try to compile my solution with this function, and I'm trying to figure out if it is just because this function has too many arguments.

Does anyone know if such a limit exists? I've copied the error I'm getting below, not the code because I figure someone either knows the answer to this or not - and if there is no limit then I'll just try to figure it out myself. Thanks very much in advance!

Here is a copy of the beginning of the error message I receive...

1>main.cpp

1>c:\cpp_ext\boost\boost_1_47\boost\python\make_function.hpp(76): 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

1>c:\cpp_ext\boost\boost_1_47\boost\python\signature.hpp(236) : see declaration of 'boost::python::detail::get_signature'

And eventually I get about a hundred copies of error messages very much resembling this one:

1>c:\cpp_ext\boost\boost_1_47\boost\python\make_function.hpp(76): error C2784: 'boost::mpl::vector17<RT,ClassT&,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)' : could not deduce template argument for 'RT (__thiscall ClassT::* )(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14) volatile const' from 'std::string (__cdecl *)(const std::string &,jal::date::JULIAN_DATE,const std::string &,const std::string &,int,const std::string &,const std::string &,const std::string &,const std::string &,const std::string &,const std::string &,int,const std::string &,const std::string &,int,const std::string &,const std::string &,const std::string &,const std::string &,const std::string &,int,const std::string &)'
1>          c:\cpp_ext\boost\boost_1_47\boost\python\signature.hpp(218) : see declaration of 'boost::python::detail::get_signature'
1>c:\cpp_ext\boost\boost_1_47\boost\python\make_function.hpp(76): 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,Target *)' : expects 2 arguments - 1 provided
1>          c:\cpp_ext\boost\boost_1_47\boost\python\signature.hpp(236) : see declaration of 'boost::python::detail::get_signature'

© Stack Overflow or respective owner

Related posts about boost-python