我正在尝试从存储库 https://github.com/vinniefalco/LuaBridge/releases编译 lua 桥
但是收到错误 C2953 'luabridge::FuncTraits': class template has been defined LuaBridgeDemo luabridgedemo-1.0\luabridgedemo-1.0\luabridge\luabridge.h 1436
经过仔细检查,在头文件中声明了两个类似的结构
template <typename R, typename D>
struct FuncTraits <R (*) () THROWSPEC, D>
{
static bool const isMemberFunction = false;
typedef D DeclType;
typedef R ReturnType;
typedef None Params;
static R call (DeclType fp, TypeListValues <Params> const&)
{
return fp ();
}
};
template <class T, typename R, typename D>
struct FuncTraits <R (T::*) () const THROWSPEC, D>
{
static bool const isMemberFunction = true;
static bool const isConstMemberFunction = true;
typedef D DeclType;
typedef T ClassType;
typedef R ReturnType;
typedef None Params;
static R call (T const* const obj, DeclType fp, TypeListValues <Params> const&)
{
(void)tvl;
return (obj->*fp)();
}
};
我正在使用 Visual C++ 2015。是否需要进行任何设置或代码更改才能解决此错误。
提前致谢