VC++ Compat again.

This commit is contained in:
ThePhD 2013-12-13 20:09:51 -05:00
parent 4dab754b86
commit 9624dd93e7
4 changed files with 28 additions and 25 deletions

View File

@ -41,7 +41,7 @@ T* get_ptr(T* val) {
} // detail
class table : virtual public reference {
template<typename T, typename U> struct proxy;
template<typename Table, typename T> struct proxy;
public:
table() noexcept : reference() {}
table(lua_State* L, int index = -1) : reference(L, index) {

View File

@ -81,7 +81,10 @@ TEST_CASE("simple/callWithParameters", "Lua function is called with a few parame
REQUIRE_NOTHROW(lua.script("function my_add(i, j, k) return i + j + k end"));
auto f = lua.get<sol::function>("my_add");
REQUIRE_NOTHROW(lua.script("function my_nothing(i, j, k) end"));
auto fvoid = lua.get<sol::function>("my_nothing");
int a;
REQUIRE_NOTHROW(fvoid(1, 2, 3));
REQUIRE_NOTHROW(a = f.call<int>(1, 2, 3));
REQUIRE(a == 6);
REQUIRE_THROWS(a = f.call<int>(1, 2, "arf"));