diff --git a/sol/reference.hpp b/sol/reference.hpp index b6808960..9acc75ed 100644 --- a/sol/reference.hpp +++ b/sol/reference.hpp @@ -50,10 +50,6 @@ public: lua_rawgeti(L, LUA_REGISTRYINDEX, ref); } - void pop() const noexcept { - lua_pop(L, 1); - } - reference(reference&& o) noexcept { L = o.L; ref = o.ref; diff --git a/sol/table.hpp b/sol/table.hpp index 170e6817..cb12c1ee 100644 --- a/sol/table.hpp +++ b/sol/table.hpp @@ -168,6 +168,9 @@ public: return proxy(*this, std::forward(key)); } + void pop(int n = 1) const noexcept { + lua_pop(state(), n); + } private: template table& set_isfunction_fx(std::true_type, T&& key, TFx&& fx) {