Hi there,
I've been trying to compile the stub_mm included with the metamod source files but I can't seem to get around errors relating to static_assert
Code:
In file included from ../core/sourcehook/sourcehook.h:118:0,
from ../core/ISmmPlugin.h:37,
from stub_mm.h:18,
from stub_mm.cpp:16:
../core/sourcehook/FastDelegate.h:181:2: error: identifier ‘static_assert’ is a keyword in C++11 [-Werror=c++0x-compat]
static_assert(sizeof(InputClass)==sizeof(u) && sizeof(InputClass)==sizeof(Outp
^
In file included from ../core/sourcehook/sourcehook.h:118:0,
from ../core/ISmmPlugin.h:37,
from stub_mm.h:18,
from stub_mm.cpp:16:
../core/sourcehook/FastDelegate.h: In function ‘OutputClass fastdelegate::detail::horrible_cast(InputClass)’:
../core/sourcehook/FastDelegate.h:182:29: error: there are no arguments to ‘static_assert’ that depend on a template parameter, so a declaration of ‘static_assert’ must be available [-fpermissive]
"Can't use horrible cast");
^
../core/sourcehook/FastDelegate.h:182:29: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
../core/sourcehook/FastDelegate.h: In static member function ‘static fastdelegate::detail::GenericClass* fastdelegate::detail::SimplifyMemFunc<N>::Convert(X*, XFuncType, GenericMemFuncType&)’:
../core/sourcehook/FastDelegate.h:297:82: error: there are no arguments to ‘static_assert’ that depend on a template parameter, so a declaration of ‘static_assert’ must be available [-fpermissive]
atic_assert(N >= 100, "Unsupported memeber function pointer on this compiler")
Code:
../core/sourcehook/FastDelegate.h:799:16: error: ‘static_assert’ was not declared in this scope
static_assert(sizeof(UnvoidStaticFuncPtr)==sizeof(this), "Can't use evil meth
Anyone have any ideas why this would happen? I thought static_assert is a part of c++1X, why would it give me errors that its not declared in the scope.
I have tried using GCC4.1, GCC4.8 and GCC5.2.
Any ideas?