mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
Squashing those GCC warnings.
This commit is contained in:
parent
f8cfb80a45
commit
cb492e7c29
|
@ -213,7 +213,7 @@ inline void push_tuple(lua_State* L, indices<I...>, T&& tuplen) {
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename F, typename... Vs, typename... Args>
|
template<typename F, typename... Vs, typename... Args>
|
||||||
auto ltr_pop(lua_State*, F&& f, types<Args...> t, types<>, Vs&&... vs) -> decltype(f(std::forward<Vs>(vs)...)) {
|
auto ltr_pop(lua_State*, F&& f, types<Args...>, types<>, Vs&&... vs) -> decltype(f(std::forward<Vs>(vs)...)) {
|
||||||
return f(std::forward<Vs>(vs)...);
|
return f(std::forward<Vs>(vs)...);
|
||||||
}
|
}
|
||||||
template<typename F, typename Head, typename... Tail, typename... Vs, typename... Args>
|
template<typename F, typename Head, typename... Tail, typename... Vs, typename... Args>
|
||||||
|
|
|
@ -58,7 +58,6 @@ class table : public reference {
|
||||||
template<std::size_t I, typename Tup, typename... Ret>
|
template<std::size_t I, typename Tup, typename... Ret>
|
||||||
typename std::tuple_element<I, std::tuple<Ret...>>::type element_get(types<Ret...>, Tup&& key) const {
|
typename std::tuple_element<I, std::tuple<Ret...>>::type element_get(types<Ret...>, Tup&& key) const {
|
||||||
typedef typename std::tuple_element<I, std::tuple<Ret...>>::type T;
|
typedef typename std::tuple_element<I, std::tuple<Ret...>>::type T;
|
||||||
typedef typename std::tuple_element<I, Tup>::type U;
|
|
||||||
push();
|
push();
|
||||||
stack::push(state(), std::get<I>(key));
|
stack::push(state(), std::get<I>(key));
|
||||||
lua_gettable(state(), -2);
|
lua_gettable(state(), -2);
|
||||||
|
|
|
@ -220,7 +220,7 @@ TEST_CASE("tables/functions_variables", "Check if tables and function calls work
|
||||||
REQUIRE_NOTHROW(run_script(lua));
|
REQUIRE_NOTHROW(run_script(lua));
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_CASE("functions/return _order", "Check if return order is in the same reading order specified in Lua" ) {
|
TEST_CASE("functions/return_order_and_multi_get", "Check if return order is in the same reading order specified in Lua" ) {
|
||||||
const static std::tuple<int, int, int> triple = std::make_tuple(10, 11, 12);
|
const static std::tuple<int, int, int> triple = std::make_tuple(10, 11, 12);
|
||||||
sol::state lua;
|
sol::state lua;
|
||||||
lua.set_function( "f", [ ] {
|
lua.set_function( "f", [ ] {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user