luaaa
luaaa copied to clipboard
gcc compile issue on centos 7
Using gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC) on centos 7 the compliler complains about missing typename.
Adding typename where the compiler suggests fixes the issue and allows the example to compile and run.
$ git diff
diff --git a/luaaa.hpp b/luaaa.hpp
index d8cdc86..7b112fa 100644
--- a/luaaa.hpp
+++ b/luaaa.hpp
@@ -2523,7 +2523,7 @@ namespace LUAAA_NS
#else
luaL_Reg regtab = { nullptr, nullptr };
luaL_openlib(m_state, m_moduleName, ®tab, 0);
- auto uData = (LuaClass<TCLASS, TAG>::UserDataDetail*)lua_newuserdata(m_state, sizeof(LuaClass<TCLASS, TAG>::UserDataDetail));
+ auto uData = (typename LuaClass<TCLASS, TAG>::UserDataDetail*)lua_newuserdata(m_state, sizeof(typename LuaClass<TCLASS, TAG>::UserDataDetail));^M
if (uData)
{
uData->obj = userData.obj;