0
我從倉庫試圖編譯LUA橋 https://github.com/vinniefalco/LuaBridge/releases錯誤編譯LUA橋
但是漸漸的錯誤 C2953「luabridge :: FuncTraits」:類模板已被定義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.是否有任何設置或代碼更改需要我來解決此錯誤。
在此先感謝