diff --git a/single/sol/sol.hpp b/single/sol/sol.hpp index cf0f4138..9640bd3e 100644 --- a/single/sol/sol.hpp +++ b/single/sol/sol.hpp @@ -20,8 +20,8 @@ // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // This file was generated with a script. -// Generated 2016-12-10 04:29:58.120585 UTC -// This header was generated with sol v2.15.5 (revision c6110e5) +// Generated 2016-12-10 10:55:55.463053 UTC +// This header was generated with sol v2.15.5 (revision f4f3bff) // https://github.com/ThePhD/sol2 #ifndef SOL_SINGLE_INCLUDE_HPP @@ -4003,6 +4003,8 @@ namespace sol { basic_userdata& operator=(basic_userdata&&) = default; basic_userdata(const stack_reference& r) : basic_userdata(r.lua_state(), r.stack_index()) {} basic_userdata(stack_reference&& r) : basic_userdata(r.lua_state(), r.stack_index()) {} + template >>, meta::neg>> = meta::enabler> + basic_userdata(lua_State* L, T&& r) : basic_userdata(L, sol::ref_index(r.registry_index())) {} basic_userdata(lua_State* L, int index = -1) : base_t(L, index) { #ifdef SOL_CHECK_ARGUMENTS type_assert(L, index, type::userdata); @@ -4035,6 +4037,8 @@ namespace sol { basic_lightuserdata& operator=(basic_lightuserdata&&) = default; basic_lightuserdata(const stack_reference& r) : basic_lightuserdata(r.lua_state(), r.stack_index()) {} basic_lightuserdata(stack_reference&& r) : basic_lightuserdata(r.lua_state(), r.stack_index()) {} + template >>, meta::neg>> = meta::enabler> + basic_lightuserdata(lua_State* L, T&& r) : basic_lightuserdata(L, sol::ref_index(r.registry_index())) {} basic_lightuserdata(lua_State* L, int index = -1) : base_t(L, index) { #ifdef SOL_CHECK_ARGUMENTS type_assert(L, index, type::lightuserdata); @@ -9008,6 +9012,8 @@ namespace sol { basic_function& operator=(basic_function&&) = default; basic_function(const stack_reference& r) : basic_function(r.lua_state(), r.stack_index()) {} basic_function(stack_reference&& r) : basic_function(r.lua_state(), r.stack_index()) {} + template >>, meta::neg>> = meta::enabler> + basic_function(lua_State* L, T&& r) : basic_function(L, sol::ref_index(r.registry_index())) {} basic_function(lua_State* L, int index = -1) : base_t(L, index) { #ifdef SOL_CHECK_ARGUMENTS stack::check(L, index, type_panic); @@ -9323,6 +9329,8 @@ namespace sol { basic_protected_function(proxy_base&& p, reference eh = get_default_handler()) : basic_protected_function(p.operator basic_function(), std::move(eh)) {} template basic_protected_function(const proxy_base& p, reference eh = get_default_handler()) : basic_protected_function(static_cast>(p), std::move(eh)) {} + template >>, meta::neg>> = meta::enabler> + basic_protected_function(lua_State* L, T&& r, reference eh) : basic_protected_function(L, sol::ref_index(r.registry_index()), std::move(eh)) {} basic_protected_function(lua_State* L, int index = -1, reference eh = get_default_handler()) : base_t(L, index), error_handler(std::move(eh)) { #ifdef SOL_CHECK_ARGUMENTS stack::check(L, index, type_panic); @@ -11869,6 +11877,8 @@ namespace sol { basic_table_core& operator=(basic_table_core&&) = default; basic_table_core(const stack_reference& r) : basic_table_core(r.lua_state(), r.stack_index()) {} basic_table_core(stack_reference&& r) : basic_table_core(r.lua_state(), r.stack_index()) {} + template >>, meta::neg>> = meta::enabler> + basic_table_core(lua_State* L, T&& r) : basic_table_core(L, sol::ref_index(r.registry_index())) {} basic_table_core(lua_State* L, int index = -1) : base_t(L, index) { #ifdef SOL_CHECK_ARGUMENTS stack::check(L, index, type_panic); @@ -12856,7 +12866,7 @@ namespace sol { } #if SOL_LUA_VERSION < 502 - inline lua_State* main_thread(lua_State* L, lua_State* backup_if_unsupported = nullptr) { + inline lua_State* main_thread(lua_State*, lua_State* backup_if_unsupported = nullptr) { return backup_if_unsupported; } #else @@ -12878,6 +12888,8 @@ namespace sol { thread(stack_reference&& r) : thread(r.lua_state(), r.stack_index()) {}; thread& operator=(const thread&) = default; thread& operator=(thread&&) = default; + template >>, meta::neg>> = meta::enabler> + thread(lua_State* L, T&& r) : thread(L, sol::ref_index(r.registry_index())) {} thread(lua_State* L, int index = -1) : reference(L, index) { #ifdef SOL_CHECK_ARGUMENTS type_assert(L, index, type::thread); @@ -12992,6 +13004,8 @@ namespace sol { coroutine(lua_nil_t r) : reference(r) {} coroutine(const stack_reference& r) noexcept : coroutine(r.lua_state(), r.stack_index()) {} coroutine(stack_reference&& r) noexcept : coroutine(r.lua_state(), r.stack_index()) {} + template >>, meta::neg>> = meta::enabler> + coroutine(lua_State* L, T&& r) : coroutine(L, sol::ref_index(r.registry_index())) {} coroutine(lua_State* L, int index = -1) : reference(L, index) { #ifdef SOL_CHECK_ARGUMENTS stack::check(L, index, type_panic); diff --git a/sol/thread.hpp b/sol/thread.hpp index 92ef110d..5e57ad1d 100644 --- a/sol/thread.hpp +++ b/sol/thread.hpp @@ -72,7 +72,7 @@ namespace sol { } #if SOL_LUA_VERSION < 502 - inline lua_State* main_thread(lua_State* L, lua_State* backup_if_unsupported = nullptr) { + inline lua_State* main_thread(lua_State*, lua_State* backup_if_unsupported = nullptr) { return backup_if_unsupported; } #else