i was trying the compile lua bridge from the repository https://github.com/vinniefalco/LuaBridge/releases
However was getting the error C2953 'luabridge::FuncTraits': class template has already been defined LuaBridgeDemo luabridgedemo-1.0\luabridgedemo-1.0\luabridge\luabridge.h 1436
Upon closer examination there are two similar structures declared on the header file
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)();
}
};
I am using Visual C++ 2015. Is there any setting or code change that I need to do to resolve this error.
Thanks in advance
I just removed the duplicate method signatures, it compiled after that.