diff --git a/3rdparty/sol2/sol/container_usertype_metatable.hpp b/3rdparty/sol2/sol/container_usertype_metatable.hpp index fc5d6894f95..9e1b67b7506 100644 --- a/3rdparty/sol2/sol/container_usertype_metatable.hpp +++ b/3rdparty/sol2/sol/container_usertype_metatable.hpp @@ -273,7 +273,7 @@ namespace sol { auto& src = get_src(L); using std::begin; stack::push(L, pairs_next_call); - stack::push>(L, src, begin(src)); + stack::push_specific>(L, src, begin(src)); stack::push(L, 1); return 3; } @@ -296,7 +296,7 @@ namespace sol { auto& src = get_src(L); using std::begin; stack::push(L, pairs_next_call); - stack::push>(L, src, begin(src)); + stack::push_specific>(L, src, begin(src)); stack::push(L, 0); return 3; } diff --git a/3rdparty/sol2/sol/function_types.hpp b/3rdparty/sol2/sol/function_types.hpp index 7c76b8d6ed0..67b0c7163ba 100644 --- a/3rdparty/sol2/sol/function_types.hpp +++ b/3rdparty/sol2/sol/function_types.hpp @@ -165,7 +165,7 @@ namespace sol { static void set_fx(lua_State* L, Args&&... args) { lua_CFunction freefunc = function_detail::call>; - stack::push>(L, std::forward(args)...); + stack::push_specific>(L, std::forward(args)...); stack::push(L, c_closure(freefunc, 1)); } @@ -181,7 +181,7 @@ namespace sol { struct pusher> { template static int push_func(std::index_sequence, lua_State* L, FP&& fp) { - return stack::push(L, detail::forward_get(fp.arguments)...); + return stack::push_specific(L, detail::forward_get(fp.arguments)...); } static int push(lua_State* L, const function_arguments& fp) { @@ -235,13 +235,13 @@ namespace sol { struct pusher> { static int push(lua_State* L, protect_t&& pw) { lua_CFunction cf = call_detail::call_user>; - int closures = stack::push>>(L, std::move(pw.value)); + int closures = stack::push_specific>>(L, std::move(pw.value)); return stack::push(L, c_closure(cf, closures)); } static int push(lua_State* L, const protect_t& pw) { lua_CFunction cf = call_detail::call_user>; - int closures = stack::push>>(L, pw.value); + int closures = stack::push_specific>>(L, pw.value); return stack::push(L, c_closure(cf, closures)); } }; @@ -314,7 +314,7 @@ namespace sol { template static int push(lua_State* L, C&& c) { lua_CFunction cf = call_detail::call_user>; - int closures = stack::push>>(L, std::forward(c)); + int closures = stack::push_specific>>(L, std::forward(c)); return stack::push(L, c_closure(cf, closures)); } }; @@ -331,7 +331,7 @@ namespace sol { struct pusher>> { static int push(lua_State* L, destructor_wrapper c) { lua_CFunction cf = call_detail::call_user>; - int closures = stack::push>(L, std::move(c)); + int closures = stack::push_specific>(L, std::move(c)); return stack::push(L, c_closure(cf, closures)); } }; diff --git a/3rdparty/sol2/sol/object.hpp b/3rdparty/sol2/sol/object.hpp index 3b69a6675ac..ab6e41854a1 100644 --- a/3rdparty/sol2/sol/object.hpp +++ b/3rdparty/sol2/sol/object.hpp @@ -43,7 +43,7 @@ namespace sol { template ::value, typename... Args> R make_reference(lua_State* L, Args&&... args) { - int backpedal = stack::push(L, std::forward(args)...); + int backpedal = stack::push_specific(L, std::forward(args)...); R r = stack::get(L, -backpedal); if (should_pop) { lua_pop(L, backpedal); @@ -99,7 +99,7 @@ namespace sol { basic_object(lua_State* L, int index = -1) noexcept : base_t(L, index) {} basic_object(lua_State* L, ref_index index) noexcept : base_t(L, index) {} template - basic_object(lua_State* L, in_place_type_t, Args&&... args) noexcept : basic_object(std::integral_constant::value>(), L, -stack::push(L, std::forward(args)...)) {} + basic_object(lua_State* L, in_place_type_t, Args&&... args) noexcept : basic_object(std::integral_constant::value>(), L, -stack::push_specific(L, std::forward(args)...)) {} template basic_object(lua_State* L, in_place_t, T&& arg, Args&&... args) noexcept : basic_object(L, in_place, std::forward(arg), std::forward(args)...) {} basic_object& operator=(const basic_object&) = default; diff --git a/3rdparty/sol2/sol/simple_usertype_metatable.hpp b/3rdparty/sol2/sol/simple_usertype_metatable.hpp index 7570a32960b..c2db29a09df 100644 --- a/3rdparty/sol2/sol/simple_usertype_metatable.hpp +++ b/3rdparty/sol2/sol/simple_usertype_metatable.hpp @@ -366,7 +366,7 @@ namespace sol { ++uniqueness; const char* gcmetakey = &usertype_traits::gc_table()[0]; - stack::push>(L, metatable_key, uniquegcmetakey, &usertype_traits::metatable()[0], + stack::push_specific>(L, metatable_key, uniquegcmetakey, &usertype_traits::metatable()[0], umx.indexbaseclasspropogation, umx.newindexbaseclasspropogation, std::move(umx.varmap), std::move(umx.registrations) ); diff --git a/3rdparty/sol2/sol/stack_core.hpp b/3rdparty/sol2/sol/stack_core.hpp index 2675e02e50b..5eceaeaf90b 100644 --- a/3rdparty/sol2/sol/stack_core.hpp +++ b/3rdparty/sol2/sol/stack_core.hpp @@ -173,9 +173,9 @@ namespace sol { return pusher>{}.push(L, std::forward(t), std::forward(args)...); } - // overload allows to use a pusher of a specific type, but pass in any kind of args - template::value>> - inline int push(lua_State* L, Arg&& arg, Args&&... args) { + // allow a pusher of a specific type, but pass in any kind of args + template + inline int push_specific(lua_State* L, Arg&& arg, Args&&... args) { return pusher>{}.push(L, std::forward(arg), std::forward(args)...); } diff --git a/3rdparty/sol2/sol/stack_push.hpp b/3rdparty/sol2/sol/stack_push.hpp index 9a839107fde..6e407cceb84 100644 --- a/3rdparty/sol2/sol/stack_push.hpp +++ b/3rdparty/sol2/sol/stack_push.hpp @@ -546,7 +546,7 @@ namespace sol { } static int push(lua_State* L, const wchar_t(&str)[N], std::size_t sz) { - return stack::push(L, str, str + sz); + return stack::push_specific(L, str, str + sz); } }; @@ -557,7 +557,7 @@ namespace sol { } static int push(lua_State* L, const char16_t(&str)[N], std::size_t sz) { - return stack::push(L, str, str + sz); + return stack::push_specific(L, str, str + sz); } }; @@ -568,7 +568,7 @@ namespace sol { } static int push(lua_State* L, const char32_t(&str)[N], std::size_t sz) { - return stack::push(L, str, str + sz); + return stack::push_specific(L, str, str + sz); } }; diff --git a/3rdparty/sol2/sol/usertype_metatable.hpp b/3rdparty/sol2/sol/usertype_metatable.hpp index 37693227a75..b496d388010 100644 --- a/3rdparty/sol2/sol/usertype_metatable.hpp +++ b/3rdparty/sol2/sol/usertype_metatable.hpp @@ -489,7 +489,7 @@ namespace sol { const char* gcmetakey = &usertype_traits::gc_table()[0]; // Make sure userdata's memory is properly in lua first, // otherwise all the light userdata we make later will become invalid - stack::push>(L, metatable_key, uniquegcmetakey, std::move(umx)); + stack::push_specific>(L, metatable_key, uniquegcmetakey, std::move(umx)); // Create the top level thing that will act as our deleter later on stack_reference umt(L, -1); stack::set_field(L, gcmetakey, umt);