diff --git a/sol/compatibility/5.x.x.h b/sol/compatibility/5.x.x.h index 79008998..9eb6f5a0 100644 --- a/sol/compatibility/5.x.x.h +++ b/sol/compatibility/5.x.x.h @@ -24,7 +24,7 @@ #include "version.hpp" -#if SOL_LUA_VERSION < 520 +#if SOL_LUA_VERSION < 502 #define LUA_RIDX_GLOBALS LUA_GLOBALSINDEX diff --git a/sol/stack.hpp b/sol/stack.hpp index 6516309b..7144100a 100644 --- a/sol/stack.hpp +++ b/sol/stack.hpp @@ -592,22 +592,22 @@ inline void call(lua_State* L, int start, indices, types, types::value>::type> inline R call(lua_State* L, int start, types tr, types ta, Fx&& fx, FxArgs&&... args) { - return detail::call(L, start, ta, tr, ta, std::forward(fx), std::forward(args)...); + return detail::call(L, start, ta, tr, ta, std::forward(fx), std::forward(args)...); } template ::value>::type> inline R call(lua_State* L, types tr, types ta, Fx&& fx, FxArgs&&... args) { - return call(L, 0, ta, tr, ta, std::forward(fx), std::forward(args)...); + return call(L, 0, ta, tr, ta, std::forward(fx), std::forward(args)...); } template inline void call(lua_State* L, int start, types tr, types ta, Fx&& fx, FxArgs&&... args) { - detail::call(L, start, ta, tr, ta, std::forward(fx), std::forward(args)...); + detail::call(L, start, ta, tr, ta, std::forward(fx), std::forward(args)...); } template inline void call(lua_State* L, types tr, types ta, Fx&& fx, FxArgs&&... args) { - call(L, 0, ta, tr, ta, std::forward(fx), std::forward(args)...); + call(L, 0, ta, tr, ta, std::forward(fx), std::forward(args)...); } inline call_syntax get_call_syntax(lua_State* L, const std::string& meta) { diff --git a/sol/state.hpp b/sol/state.hpp index 04b538e2..fcd8a202 100644 --- a/sol/state.hpp +++ b/sol/state.hpp @@ -58,7 +58,7 @@ public: state(): L(luaL_newstate(), lua_close), reg(L.get(), LUA_REGISTRYINDEX), -#if SOL_LUA_VERSION < 520 +#if SOL_LUA_VERSION < 503 // Global table is just a special index global(L.get(), LUA_GLOBALSINDEX) { #else diff --git a/sol/types.hpp b/sol/types.hpp index e7b82d7e..f4e8e69c 100644 --- a/sol/types.hpp +++ b/sol/types.hpp @@ -118,64 +118,43 @@ class function; class object; template -struct lua_type_of : std::integral_constant { - -}; +struct lua_type_of : std::integral_constant {}; template <> -struct lua_type_of : std::integral_constant { - -}; +struct lua_type_of : std::integral_constant {}; template -struct lua_type_of : std::integral_constant { - -}; +struct lua_type_of : std::integral_constant {}; template <> -struct lua_type_of : std::integral_constant { - -}; +struct lua_type_of : std::integral_constant {}; template <> -struct lua_type_of : std::integral_constant { - -}; +struct lua_type_of : std::integral_constant {}; template <> -struct lua_type_of : std::integral_constant { - -}; +struct lua_type_of : std::integral_constant {}; template <> -struct lua_type_of : std::integral_constant { - -}; +struct lua_type_of
: std::integral_constant {}; template <> -struct lua_type_of : std::integral_constant { - -}; +struct lua_type_of : std::integral_constant {}; template <> -struct lua_type_of : std::integral_constant { - -}; +struct lua_type_of : std::integral_constant {}; template <> -struct lua_type_of : std::integral_constant { +struct lua_type_of : std::integral_constant {}; -}; +template +struct lua_type_of> : std::integral_constant{}; template -struct lua_type_of : std::integral_constant { - -}; +struct lua_type_of : std::integral_constant {}; template -struct lua_type_of::value>::type> : std::integral_constant { - -}; +struct lua_type_of::value>::type> : std::integral_constant {}; template inline type type_of() { diff --git a/tests.cpp b/tests.cpp index f2baa3c7..83be07f6 100644 --- a/tests.cpp +++ b/tests.cpp @@ -1,4 +1,5 @@ #define CATCH_CONFIG_MAIN +#define SOL_CHECK_ARGUMENTS #include #include #include