Boost Python – 包装函数时限制参数的数量

我正在使用Boost Python来包装我创建的一些C函数.我的一个C函数包含22个参数.当我尝试用这个函数编译我的解决方案时Boost抱怨,我试图弄清楚它是否只是因为这个函数有太多的参数.

有谁知道这样的限制是否存在?我已经复制了我在下面的错误,而不是代码,因为我认为某人要么知道答案还是没有 – 如果没有限制,那么我只是试着弄清楚自己.首先十分感谢!

这是我收到的错误消息开头的副本…

1>main.cpp

1>c:\cpp_ext\boost\boost_1_47\boost\python\make_function.hpp(76): error C2780: 'boost::mpl::vector17sst>::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,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'

最终我得到了大约一百个与此类似的错误消息:

1>c:\cpp_ext\boost\boost_1_47\boost\python\make_function.hpp(76): error C2784: 'boost::mpl::vector17sst&,T14) volatile const)' : Could not deduce template argument for 'RT (__thiscall Classt::* )(T0,T14) volatile const' from 'std::string (__cdecl *)(const std::string &,jal::date::JULIAN_DATE,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::vector17aration of 'boost::python::detail::get_signature'
最佳答案
是的,有一个限制.根据链接,它看起来像是15,但我相信你可以改变它.

相关文章

我最近重新拾起了计算机视觉,借助Python的opencv还有face_r...
说到Pooling,相信学习过CNN的朋友们都不会感到陌生。Poolin...
记得大一学Python的时候,有一个题目是判断一个数是否是复数...
文章目录 3 直方图Histogramplot1. 基本直方图的绘制 Basic ...
文章目录 5 小提琴图Violinplot1. 基础小提琴图绘制 Basic v...
文章目录 4 核密度图Densityplot1. 基础核密度图绘制 Basic ...