2011-11-28 16 views
5

私が作成したC++関数をBoost Pythonでラップしています。私のC++関数の1つに22の引数が含まれています。ブーストは、この関数で私の解をコンパイルしようとすると文句を言って、この関数が多すぎる引数を持っているからだけであるかどうかを調べようとしています。Boost Python - 関数をラップする際の引数の数に制限があります。

このような制限が存在するかどうかは知りませんか?私は誰かがこれに対する答えを知っているかのように思うので、私は下にあるエラーをコピーしました。コードがありません。制限がなければ、自分でそれを理解しようとします。ありがとうございました!ここで

は...私はエラーメッセージの始まりのコピーである

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' 

、最終的に私は非常にこの1に似たエラーメッセージの200枚について取得:

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' 

答えて

4

はい制限があります。 You can find those limits here.それはリンクによると、私はあなたがそれを変更することができると信じていますが、15と思われる。

+0

リンクをありがとうございます!私は、なぜ彼らは、プログラムがまだ動作する制限を変更することによって、それらのような任意の制限を課すだろうのだろう... 私はその値を変更することが可能だと言った部分を見つけられませんでした、それはどうですか? – Derek

+2

@Derekバリデーションテンプレート(新しい標準では)がなければ、各バージョンを手書きしなければならないので、どこかで停止する必要があります。異なるライブラリ(拡張モジュールとBoost.Pythonライブラリ自体を含む)をコンパイルするときに、これらのマクロの異なる値を使用してこれらの数値を変更する機能は、ODRに違反します。しかし、この特定の違反が検出されたり、問題を引き起こしたりするC++実装がないことはわかっています._実際に実行できない場合は、なぜそれを呼び出すのですか? – stonemetal

関連する問題