mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
VC++ Compat again.
This commit is contained in:
parent
4dab754b86
commit
9624dd93e7
|
@ -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) {
|
||||
|
|
|
@ -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"));
|
||||
|
|
Loading…
Reference in New Issue
Block a user