c++ - luabind - 参数超过 10 个的函数

标签 c++ luabind

我想在 luabind 中使用超过 10 个参数的函数,但我遇到了一些 C2784 和 C2780 编译器错误 (VS2012 Express)。
看来问题是使用的 boost 库的限制。在 luabind 中,可以设置 LUABIND_MAX_ARITY 选项,但这取决于 boost 的可能性。我怎样才能克服这个限制?

谢谢!

代码:

luabind::module(lua) [
    luabind::class_<WkmParserDB>("WkmParserDB")
        .def("insertInterface", &WkmParserDB::insertInterface)
        .def("insertIntfStats", &WkmParserDB::insertIntfStats)
        .def("intertIntfN1k", &WkmParserDB::intertIntfN1k)
];

insertIntfStats 函数有大约 20 个 std::string 参数,没有别的。其他两个函数的参数少于 8 个(std::string 也是如此)。当我评论“.def("insertIntfStats", &WkmParserDB::insertIntfStats)”行时,它会编译并运行。

错误:

Fehler  3   error C2784: "boost::mpl::vector12<R,const most_derived<T,Wrapped>::type&,A0,A1,A2,A3,A4,A5,A6,A7,A8,A9> luabind::detail::deduce_signature(R (__thiscall T::* )(A0,A1,A2,A3,A4,A5,A6,A7,A8,A9) const,Wrapped *)": template-Argument für "R (__thiscall T::* )(A0,A1,A2,A3,A4,A5,A6,A7,A8,A9) const" konnte nicht von "std::basic_string<_Elem,_Traits,_Alloc> " hergeleitet werden. d:\programmieren\luabind-0.9.1\luabind\class.hpp    311 1   wktools4
Fehler  4   error C2780: 'boost::mpl::vector12<R,const T&,A0,A1,A2,A3,A4,A5,A6,A7,A8,A9> luabind::detail::deduce_signature(R (__thiscall T::* )(A0,A1,A2,A3,A4,A5,A6,A7,A8,A9) const)': Erwartet 1 Argumente - 2 unterstützt    d:\programmieren\luabind-0.9.1\luabind\class.hpp    311 1   wktools4
Fehler  5   error C2784: "boost::mpl::vector12<R,most_derived<T,Wrapped>::type&,A0,A1,A2,A3,A4,A5,A6,A7,A8,A9> luabind::detail::deduce_signature(R (__thiscall T::* )(A0,A1,A2,A3,A4,A5,A6,A7,A8,A9),Wrapped *)": template-Argument für "R (__thiscall T::* )(A0,A1,A2,A3,A4,A5,A6,A7,A8,A9)" konnte nicht von "std::basic_string<_Elem,_Traits,_Alloc> " hergeleitet werden.   d:\programmieren\luabind-0.9.1\luabind\class.hpp    311 1   wktools4
Fehler  6   error C2780: 'boost::mpl::vector12<R,T&,A0,A1,A2,A3,A4,A5,A6,A7,A8,A9> luabind::detail::deduce_signature(R (__thiscall T::* )(A0,A1,A2,A3,A4,A5,A6,A7,A8,A9))': Erwartet 1 Argumente - 2 unterstützt    d:\programmieren\luabind-0.9.1\luabind\class.hpp    311 1   wktools4
Fehler  7   error C2784: "boost::mpl::vector11<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10> luabind::detail::deduce_signature(R (__cdecl *)(A0,A1,A2,A3,A4,A5,A6,A7,A8,A9),...)": template-Argument für "R (__cdecl *)(A0,A1,A2,A3,A4,A5,A6,A7,A8,A9)" konnte nicht von "std::basic_string<_Elem,_Traits,_Alloc> " hergeleitet werden.    d:\programmieren\luabind-0.9.1\luabind\class.hpp    311 1   wktools4
Fehler  8   error C2784: "boost::mpl::vector11<R,const most_derived<T,Wrapped>::type&,A0,A1,A2,A3,A4,A5,A6,A7,A8> luabind::detail::deduce_signature(R (__thiscall T::* )(A0,A1,A2,A3,A4,A5,A6,A7,A8) const,Wrapped *)": template-Argument für "R (__thiscall T::* )(A0,A1,A2,A3,A4,A5,A6,A7,A8) const" konnte nicht von "std::basic_string<_Elem,_Traits,_Alloc> " hergeleitet werden.  d:\programmieren\luabind-0.9.1\luabind\class.hpp    311 1   wktools4
Fehler  9   error C2780: 'boost::mpl::vector11<R,const T&,A0,A1,A2,A3,A4,A5,A6,A7,A8> luabind::detail::deduce_signature(R (__thiscall T::* )(A0,A1,A2,A3,A4,A5,A6,A7,A8) const)': Erwartet 1 Argumente - 2 unterstützt  d:\programmieren\luabind-0.9.1\luabind\class.hpp    311 1   wktools4
Fehler  10  error C2784: "boost::mpl::vector11<R,most_derived<T,Wrapped>::type&,A0,A1,A2,A3,A4,A5,A6,A7,A8> luabind::detail::deduce_signature(R (__thiscall T::* )(A0,A1,A2,A3,A4,A5,A6,A7,A8),Wrapped *)": template-Argument für "R (__thiscall T::* )(A0,A1,A2,A3,A4,A5,A6,A7,A8)" konnte nicht von "std::basic_string<_Elem,_Traits,_Alloc> " hergeleitet werden.    d:\programmieren\luabind-0.9.1\luabind\class.hpp    311 1   wktools4
Fehler  11  error C2780: 'boost::mpl::vector11<R,T&,A0,A1,A2,A3,A4,A5,A6,A7,A8> luabind::detail::deduce_signature(R (__thiscall T::* )(A0,A1,A2,A3,A4,A5,A6,A7,A8))': Erwartet 1 Argumente - 2 unterstützt  d:\programmieren\luabind-0.9.1\luabind\class.hpp    311 1   wktools4
Fehler  12  error C2784: "boost::mpl::vector10<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9> luabind::detail::deduce_signature(R (__cdecl *)(A0,A1,A2,A3,A4,A5,A6,A7,A8),...)": template-Argument für "R (__cdecl *)(A0,A1,A2,A3,A4,A5,A6,A7,A8)" konnte nicht von "std::basic_string<_Elem,_Traits,_Alloc> " hergeleitet werden.  d:\programmieren\luabind-0.9.1\luabind\class.hpp    311 1   wktools4
Fehler  13  error C2784: "boost::mpl::vector10<R,const most_derived<T,Wrapped>::type&,A0,A1,A2,A3,A4,A5,A6,A7> luabind::detail::deduce_signature(R (__thiscall T::* )(A0,A1,A2,A3,A4,A5,A6,A7) const,Wrapped *)": template-Argument für "R (__thiscall T::* )(A0,A1,A2,A3,A4,A5,A6,A7) const" konnte nicht von "std::basic_string<_Elem,_Traits,_Alloc> " hergeleitet werden.   d:\programmieren\luabind-0.9.1\luabind\class.hpp    311 1   wktools4
Fehler  14  error C2780: 'boost::mpl::vector10<R,const T&,A0,A1,A2,A3,A4,A5,A6,A7> luabind::detail::deduce_signature(R (__thiscall T::* )(A0,A1,A2,A3,A4,A5,A6,A7) const)': Erwartet 1 Argumente - 2 unterstützt    d:\programmieren\luabind-0.9.1\luabind\class.hpp    311 1   wktools4
Fehler  15  error C2784: "boost::mpl::vector10<R,most_derived<T,Wrapped>::type&,A0,A1,A2,A3,A4,A5,A6,A7> luabind::detail::deduce_signature(R (__thiscall T::* )(A0,A1,A2,A3,A4,A5,A6,A7),Wrapped *)": template-Argument für "R (__thiscall T::* )(A0,A1,A2,A3,A4,A5,A6,A7)" konnte nicht von "std::basic_string<_Elem,_Traits,_Alloc> " hergeleitet werden. d:\programmieren\luabind-0.9.1\luabind\class.hpp    311 1   wktools4
Fehler  16  error C2780: 'boost::mpl::vector10<R,T&,A0,A1,A2,A3,A4,A5,A6,A7> luabind::detail::deduce_signature(R (__thiscall T::* )(A0,A1,A2,A3,A4,A5,A6,A7))': Erwartet 1 Argumente - 2 unterstützt    d:\programmieren\luabind-0.9.1\luabind\class.hpp    311 1   wktools4
Fehler  17  error C2784: "boost::mpl::vector9<T0,T1,T2,T3,T4,T5,T6,T7,T8> luabind::detail::deduce_signature(R (__cdecl *)(A0,A1,A2,A3,A4,A5,A6,A7),...)": template-Argument für "R (__cdecl *)(A0,A1,A2,A3,A4,A5,A6,A7)" konnte nicht von "std::basic_string<_Elem,_Traits,_Alloc> " hergeleitet werden.    d:\programmieren\luabind-0.9.1\luabind\class.hpp    311 1   wktools4
Fehler  18  error C2784: "boost::mpl::vector9<R,const most_derived<T,Wrapped>::type&,A0,A1,A2,A3,A4,A5,A6> luabind::detail::deduce_signature(R (__thiscall T::* )(A0,A1,A2,A3,A4,A5,A6) const,Wrapped *)": template-Argument für "R (__thiscall T::* )(A0,A1,A2,A3,A4,A5,A6) const" konnte nicht von "std::basic_string<_Elem,_Traits,_Alloc> " hergeleitet werden. d:\programmieren\luabind-0.9.1\luabind\class.hpp    311 1   wktools4
Fehler  19  error C2780: 'boost::mpl::vector9<R,const T&,A0,A1,A2,A3,A4,A5,A6> luabind::detail::deduce_signature(R (__thiscall T::* )(A0,A1,A2,A3,A4,A5,A6) const)': Erwartet 1 Argumente - 2 unterstützt   d:\programmieren\luabind-0.9.1\luabind\class.hpp    311 1   wktools4
Fehler  20  error C2784: "boost::mpl::vector9<R,most_derived<T,Wrapped>::type&,A0,A1,A2,A3,A4,A5,A6> luabind::detail::deduce_signature(R (__thiscall T::* )(A0,A1,A2,A3,A4,A5,A6),Wrapped *)": template-Argument für "R (__thiscall T::* )(A0,A1,A2,A3,A4,A5,A6)" konnte nicht von "std::basic_string<_Elem,_Traits,_Alloc> " hergeleitet werden.   d:\programmieren\luabind-0.9.1\luabind\class.hpp    311 1   wktools4
Fehler  21  error C2780: 'boost::mpl::vector9<R,T&,A0,A1,A2,A3,A4,A5,A6> luabind::detail::deduce_signature(R (__thiscall T::* )(A0,A1,A2,A3,A4,A5,A6))': Erwartet 1 Argumente - 2 unterstützt   d:\programmieren\luabind-0.9.1\luabind\class.hpp    311 1   wktools4
Fehler  22  error C2784: "boost::mpl::vector8<T0,T1,T2,T3,T4,T5,T6,T7> luabind::detail::deduce_signature(R (__cdecl *)(A0,A1,A2,A3,A4,A5,A6),...)": template-Argument für "R (__cdecl *)(A0,A1,A2,A3,A4,A5,A6)" konnte nicht von "std::basic_string<_Elem,_Traits,_Alloc> " hergeleitet werden. d:\programmieren\luabind-0.9.1\luabind\class.hpp    311 1   wktools4
Fehler  23  error C2784: "boost::mpl::vector8<R,const most_derived<T,Wrapped>::type&,A0,A1,A2,A3,A4,A5> luabind::detail::deduce_signature(R (__thiscall T::* )(A0,A1,A2,A3,A4,A5) const,Wrapped *)": template-Argument für "R (__thiscall T::* )(A0,A1,A2,A3,A4,A5) const" konnte nicht von "std::basic_string<_Elem,_Traits,_Alloc> " hergeleitet werden.  d:\programmieren\luabind-0.9.1\luabind\class.hpp    311 1   wktools4
Fehler  24  error C2780: 'boost::mpl::vector8<R,const T&,A0,A1,A2,A3,A4,A5> luabind::detail::deduce_signature(R (__thiscall T::* )(A0,A1,A2,A3,A4,A5) const)': Erwartet 1 Argumente - 2 unterstützt d:\programmieren\luabind-0.9.1\luabind\class.hpp    311 1   wktools4
Fehler  25  error C2784: "boost::mpl::vector8<R,most_derived<T,Wrapped>::type&,A0,A1,A2,A3,A4,A5> luabind::detail::deduce_signature(R (__thiscall T::* )(A0,A1,A2,A3,A4,A5),Wrapped *)": template-Argument für "R (__thiscall T::* )(A0,A1,A2,A3,A4,A5)" konnte nicht von "std::basic_string<_Elem,_Traits,_Alloc> " hergeleitet werden.    d:\programmieren\luabind-0.9.1\luabind\class.hpp    311 1   wktools4
Fehler  26  error C2780: 'boost::mpl::vector8<R,T&,A0,A1,A2,A3,A4,A5> luabind::detail::deduce_signature(R (__thiscall T::* )(A0,A1,A2,A3,A4,A5))': Erwartet 1 Argumente - 2 unterstützt d:\programmieren\luabind-0.9.1\luabind\class.hpp    311 1   wktools4
Fehler  27  error C2784: "boost::mpl::vector7<T0,T1,T2,T3,T4,T5,T6> luabind::detail::deduce_signature(R (__cdecl *)(A0,A1,A2,A3,A4,A5),...)": template-Argument für "R (__cdecl *)(A0,A1,A2,A3,A4,A5)" konnte nicht von "std::basic_string<_Elem,_Traits,_Alloc> " hergeleitet werden.  d:\programmieren\luabind-0.9.1\luabind\class.hpp    311 1   wktools4
Fehler  28  error C2784: "boost::mpl::vector7<R,const most_derived<T,Wrapped>::type&,A0,A1,A2,A3,A4> luabind::detail::deduce_signature(R (__thiscall T::* )(A0,A1,A2,A3,A4) const,Wrapped *)": template-Argument für "R (__thiscall T::* )(A0,A1,A2,A3,A4) const" konnte nicht von "std::basic_string<_Elem,_Traits,_Alloc> " hergeleitet werden.   d:\programmieren\luabind-0.9.1\luabind\class.hpp    311 1   wktools4
Fehler  29  error C2780: 'boost::mpl::vector7<R,const T&,A0,A1,A2,A3,A4> luabind::detail::deduce_signature(R (__thiscall T::* )(A0,A1,A2,A3,A4) const)': Erwartet 1 Argumente - 2 unterstützt   d:\programmieren\luabind-0.9.1\luabind\class.hpp    311 1   wktools4
Fehler  30  error C2784: "boost::mpl::vector7<R,most_derived<T,Wrapped>::type&,A0,A1,A2,A3,A4> luabind::detail::deduce_signature(R (__thiscall T::* )(A0,A1,A2,A3,A4),Wrapped *)": template-Argument für "R (__thiscall T::* )(A0,A1,A2,A3,A4)" konnte nicht von "std::basic_string<_Elem,_Traits,_Alloc> " hergeleitet werden. d:\programmieren\luabind-0.9.1\luabind\class.hpp    311 1   wktools4
Fehler  31  error C2780: 'boost::mpl::vector7<R,T&,A0,A1,A2,A3,A4> luabind::detail::deduce_signature(R (__thiscall T::* )(A0,A1,A2,A3,A4))': Erwartet 1 Argumente - 2 unterstützt   d:\programmieren\luabind-0.9.1\luabind\class.hpp    311 1   wktools4
Fehler  32  error C2784: "boost::mpl::vector6<T0,T1,T2,T3,T4,T5> luabind::detail::deduce_signature(R (__cdecl *)(A0,A1,A2,A3,A4),...)": template-Argument für "R (__cdecl *)(A0,A1,A2,A3,A4)" konnte nicht von "std::basic_string<_Elem,_Traits,_Alloc> " hergeleitet werden.   d:\programmieren\luabind-0.9.1\luabind\class.hpp    311 1   wktools4
Fehler  33  error C2784: "boost::mpl::vector6<R,const most_derived<T,Wrapped>::type&,A0,A1,A2,A3> luabind::detail::deduce_signature(R (__thiscall T::* )(A0,A1,A2,A3) const,Wrapped *)": template-Argument für "R (__thiscall T::* )(A0,A1,A2,A3) const" konnte nicht von "std::basic_string<_Elem,_Traits,_Alloc> " hergeleitet werden.    d:\programmieren\luabind-0.9.1\luabind\class.hpp    311 1   wktools4
Fehler  34  error C2780: 'boost::mpl::vector6<R,const T&,A0,A1,A2,A3> luabind::detail::deduce_signature(R (__thiscall T::* )(A0,A1,A2,A3) const)': Erwartet 1 Argumente - 2 unterstützt d:\programmieren\luabind-0.9.1\luabind\class.hpp    311 1   wktools4
Fehler  35  error C2784: "boost::mpl::vector6<R,most_derived<T,Wrapped>::type&,A0,A1,A2,A3> luabind::detail::deduce_signature(R (__thiscall T::* )(A0,A1,A2,A3),Wrapped *)": template-Argument für "R (__thiscall T::* )(A0,A1,A2,A3)" konnte nicht von "std::basic_string<_Elem,_Traits,_Alloc> " hergeleitet werden.  d:\programmieren\luabind-0.9.1\luabind\class.hpp    311 1   wktools4
Fehler  36  error C2780: 'boost::mpl::vector6<R,T&,A0,A1,A2,A3> luabind::detail::deduce_signature(R (__thiscall T::* )(A0,A1,A2,A3))': Erwartet 1 Argumente - 2 unterstützt d:\programmieren\luabind-0.9.1\luabind\class.hpp    311 1   wktools4
Fehler  37  error C2784: "boost::mpl::vector5<T0,T1,T2,T3,T4> luabind::detail::deduce_signature(R (__cdecl *)(A0,A1,A2,A3),...)": template-Argument für "R (__cdecl *)(A0,A1,A2,A3)" konnte nicht von "std::basic_string<_Elem,_Traits,_Alloc> " hergeleitet werden.    d:\programmieren\luabind-0.9.1\luabind\class.hpp    311 1   wktools4
Fehler  38  error C2784: "boost::mpl::vector5<R,const most_derived<T,Wrapped>::type&,A0,A1,A2> luabind::detail::deduce_signature(R (__thiscall T::* )(A0,A1,A2) const,Wrapped *)": template-Argument für "R (__thiscall T::* )(A0,A1,A2) const" konnte nicht von "std::basic_string<_Elem,_Traits,_Alloc> " hergeleitet werden. d:\programmieren\luabind-0.9.1\luabind\class.hpp    311 1   wktools4
Fehler  39  error C2780: 'boost::mpl::vector5<R,const T&,A0,A1,A2> luabind::detail::deduce_signature(R (__thiscall T::* )(A0,A1,A2) const)': Erwartet 1 Argumente - 2 unterstützt   d:\programmieren\luabind-0.9.1\luabind\class.hpp    311 1   wktools4
Fehler  40  error C2784: "boost::mpl::vector5<R,most_derived<T,Wrapped>::type&,A0,A1,A2> luabind::detail::deduce_signature(R (__thiscall T::* )(A0,A1,A2),Wrapped *)": template-Argument für "R (__thiscall T::* )(A0,A1,A2)" konnte nicht von "std::basic_string<_Elem,_Traits,_Alloc> " hergeleitet werden.   d:\programmieren\luabind-0.9.1\luabind\class.hpp    311 1   wktools4
Fehler  41  error C2780: 'boost::mpl::vector5<R,T&,A0,A1,A2> luabind::detail::deduce_signature(R (__thiscall T::* )(A0,A1,A2))': Erwartet 1 Argumente - 2 unterstützt   d:\programmieren\luabind-0.9.1\luabind\class.hpp    311 1   wktools4
Fehler  42  error C2784: "boost::mpl::vector4<T0,T1,T2,T3> luabind::detail::deduce_signature(R (__cdecl *)(A0,A1,A2),...)": template-Argument für "R (__cdecl *)(A0,A1,A2)" konnte nicht von "std::basic_string<_Elem,_Traits,_Alloc> " hergeleitet werden. d:\programmieren\luabind-0.9.1\luabind\class.hpp    311 1   wktools4
Fehler  43  error C2784: "boost::mpl::vector4<R,const most_derived<T,Wrapped>::type&,A0,A1> luabind::detail::deduce_signature(R (__thiscall T::* )(A0,A1) const,Wrapped *)": template-Argument für "R (__thiscall T::* )(A0,A1) const" konnte nicht von "std::basic_string<_Elem,_Traits,_Alloc> " hergeleitet werden.  d:\programmieren\luabind-0.9.1\luabind\class.hpp    311 1   wktools4
Fehler  44  error C2780: 'boost::mpl::vector4<R,const T&,A0,A1> luabind::detail::deduce_signature(R (__thiscall T::* )(A0,A1) const)': Erwartet 1 Argumente - 2 unterstützt d:\programmieren\luabind-0.9.1\luabind\class.hpp    311 1   wktools4
Fehler  45  error C2784: "boost::mpl::vector4<R,most_derived<T,Wrapped>::type&,A0,A1> luabind::detail::deduce_signature(R (__thiscall T::* )(A0,A1),Wrapped *)": template-Argument für "R (__thiscall T::* )(A0,A1)" konnte nicht von "std::basic_string<_Elem,_Traits,_Alloc> " hergeleitet werden.    d:\programmieren\luabind-0.9.1\luabind\class.hpp    311 1   wktools4
Fehler  46  error C2780: 'boost::mpl::vector4<R,T&,A0,A1> luabind::detail::deduce_signature(R (__thiscall T::* )(A0,A1))': Erwartet 1 Argumente - 2 unterstützt d:\programmieren\luabind-0.9.1\luabind\class.hpp    311 1   wktools4
Fehler  47  error C2784: "boost::mpl::vector3<T0,T1,T2> luabind::detail::deduce_signature(R (__cdecl *)(A0,A1),...)": template-Argument für "R (__cdecl *)(A0,A1)" konnte nicht von "std::basic_string<_Elem,_Traits,_Alloc> " hergeleitet werden.  d:\programmieren\luabind-0.9.1\luabind\class.hpp    311 1   wktools4
Fehler  48  error C2784: "boost::mpl::vector3<R,const most_derived<T,Wrapped>::type&,A0> luabind::detail::deduce_signature(R (__thiscall T::* )(A0) const,Wrapped *)": template-Argument für "R (__thiscall T::* )(A0) const" konnte nicht von "std::basic_string<_Elem,_Traits,_Alloc> " hergeleitet werden.   d:\programmieren\luabind-0.9.1\luabind\class.hpp    311 1   wktools4
Fehler  49  error C2780: 'boost::mpl::vector3<R,const T&,A0> luabind::detail::deduce_signature(R (__thiscall T::* )(A0) const)': Erwartet 1 Argumente - 2 unterstützt   d:\programmieren\luabind-0.9.1\luabind\class.hpp    311 1   wktools4
Fehler  50  error C2784: "boost::mpl::vector3<R,most_derived<T,Wrapped>::type&,A0> luabind::detail::deduce_signature(R (__thiscall T::* )(A0),Wrapped *)": template-Argument für "R (__thiscall T::* )(A0)" konnte nicht von "std::basic_string<_Elem,_Traits,_Alloc> " hergeleitet werden. d:\programmieren\luabind-0.9.1\luabind\class.hpp    311 1   wktools4
Fehler  51  error C2780: 'boost::mpl::vector3<R,T&,A0> luabind::detail::deduce_signature(R (__thiscall T::* )(A0))': Erwartet 1 Argumente - 2 unterstützt   d:\programmieren\luabind-0.9.1\luabind\class.hpp    311 1   wktools4
Fehler  52  error C2784: "boost::mpl::vector2<T0,T1> luabind::detail::deduce_signature(R (__cdecl *)(A0),...)": template-Argument für "R (__cdecl *)(A0)" konnte nicht von "std::basic_string<_Elem,_Traits,_Alloc> " hergeleitet werden.   d:\programmieren\luabind-0.9.1\luabind\class.hpp    311 1   wktools4
Fehler  53  error C2784: "boost::mpl::vector2<R,const most_derived<T,Wrapped>::type&> luabind::detail::deduce_signature(R (__thiscall T::* )(void) const,Wrapped *)": template-Argument für "R (__thiscall T::* )(void) const" konnte nicht von "std::basic_string<_Elem,_Traits,_Alloc> " hergeleitet werden.  d:\programmieren\luabind-0.9.1\luabind\class.hpp    311 1   wktools4
Fehler  54  error C2780: 'boost::mpl::vector2<R,const T&> luabind::detail::deduce_signature(R (__thiscall T::* )(void) const)': Erwartet 1 Argumente - 2 unterstützt    d:\programmieren\luabind-0.9.1\luabind\class.hpp    311 1   wktools4
Fehler  55  error C2784: "boost::mpl::vector2<R,most_derived<T,Wrapped>::type&> luabind::detail::deduce_signature(R (__thiscall T::* )(void),Wrapped *)": template-Argument für "R (__thiscall T::* )(void)" konnte nicht von "std::basic_string<_Elem,_Traits,_Alloc> " hergeleitet werden.    d:\programmieren\luabind-0.9.1\luabind\class.hpp    311 1   wktools4
Fehler  56  error C2780: 'boost::mpl::vector2<R,T&> luabind::detail::deduce_signature(R (__thiscall T::* )(void))': Erwartet 1 Argumente - 2 unterstützt    d:\programmieren\luabind-0.9.1\luabind\class.hpp    311 1   wktools4
Fehler  57  error C2784: "boost::mpl::vector1<T0> luabind::detail::deduce_signature(R (__cdecl *)(void),...)": template-Argument für "R (__cdecl *)(void)" konnte nicht von "std::basic_string<_Elem,_Traits,_Alloc> " hergeleitet werden.  d:\programmieren\luabind-0.9.1\luabind\class.hpp    311 1   wktools4
Fehler  58  error C2780: 'luabind::adl::object luabind::make_function(lua_State *,F)': Erwartet 2 Argumente - 4 unterstützt d:\programmieren\luabind-0.9.1\luabind\class.hpp    311 1   wktools4

最佳答案

虽然这是个问题,但更大的问题是你有一个函数需要超过 10 个参数!!

您需要做的是着眼于简化此函数的接口(interface),可能是将参数提取到结构或类(我认为是 Lua 中的字典)中。

关于c++ - luabind - 参数超过 10 个的函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14647639/

相关文章:

c++ - 使用 C 扫描 wifi 网络

c++ - 对于每个模板类型,一个集合类型的参数

c++ - 构建 luabind 时出现错误 C2665

c# - 将 Luabind 转换为 C#?

Luabind 有条件调用 Lua 函数

c++ - 可变参数模板函数的扩展导致段错误

C++ : Calling inherited static method from static method

c++ - 微软 SQL 服务器 : Access a local temporary table in a prepared statement

Luabind - 无法找到 Lua 库

c++ - 使用 C++ 中的 Luabind 在循环中创建的对象导致应用程序崩溃