diff --git a/include/sol/make_reference.hpp b/include/sol/make_reference.hpp index 9a404ec7..ed4fa397 100644 --- a/include/sol/make_reference.hpp +++ b/include/sol/make_reference.hpp @@ -29,7 +29,7 @@ namespace sol { - template ::value, typename T> + template , typename T> R make_reference(lua_State* L, T&& value) { int backpedal = stack::push(L, std::forward(value)); R r = stack::get(L, -backpedal); @@ -39,7 +39,7 @@ namespace sol { return r; } - template ::value, typename... Args> + template , typename... Args> R make_reference(lua_State* L, Args&&... args) { int backpedal = stack::push(L, std::forward(args)...); R r = stack::get(L, -backpedal); diff --git a/include/sol/usertype_container_launch.hpp b/include/sol/usertype_container_launch.hpp index b36152a9..a9b8f08c 100644 --- a/include/sol/usertype_container_launch.hpp +++ b/include/sol/usertype_container_launch.hpp @@ -409,14 +409,10 @@ namespace sol { struct unqualified_pusher>> { using C = T; - static int push(lua_State* L, const T& cont) { + template + static int push(lua_State* L, Args&&... args) { stack_detail::metatable_setup fx(L); - return stack::push>(L, detail::with_function_tag(), fx, cont); - } - - static int push(lua_State* L, T&& cont) { - stack_detail::metatable_setup fx(L); - return stack::push>(L, detail::with_function_tag(), fx, std::move(cont)); + return stack::push>(L, detail::with_function_tag(), fx, std::forward(args)...); } }; diff --git a/single/include/sol/forward.hpp b/single/include/sol/forward.hpp index 75104fa9..f4c7285d 100644 --- a/single/include/sol/forward.hpp +++ b/single/include/sol/forward.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 2019-05-21 06:13:48.131882 UTC -// This header was generated with sol v3.0.1-beta2 (revision bd17c83) +// Generated 2019-05-21 06:26:29.108703 UTC +// This header was generated with sol v3.0.1-beta2 (revision 5dee45c) // https://github.com/ThePhD/sol2 #ifndef SOL_SINGLE_INCLUDE_FORWARD_HPP diff --git a/single/include/sol/sol.hpp b/single/include/sol/sol.hpp index d59abfb3..910ff89c 100644 --- a/single/include/sol/sol.hpp +++ b/single/include/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 2019-05-21 06:13:47.481002 UTC -// This header was generated with sol v3.0.1-beta2 (revision bd17c83) +// Generated 2019-05-21 06:26:28.717749 UTC +// This header was generated with sol v3.0.1-beta2 (revision 5dee45c) // https://github.com/ThePhD/sol2 #ifndef SOL_SINGLE_INCLUDE_HPP @@ -14514,7 +14514,7 @@ namespace sol { namespace sol { - template ::value, typename T> + template , typename T> R make_reference(lua_State* L, T&& value) { int backpedal = stack::push(L, std::forward(value)); R r = stack::get(L, -backpedal); @@ -14524,7 +14524,7 @@ namespace sol { return r; } - template ::value, typename... Args> + template , typename... Args> R make_reference(lua_State* L, Args&&... args) { int backpedal = stack::push(L, std::forward(args)...); R r = stack::get(L, -backpedal); @@ -20549,14 +20549,10 @@ namespace sol { struct unqualified_pusher>> { using C = T; - static int push(lua_State* L, const T& cont) { + template + static int push(lua_State* L, Args&&... args) { stack_detail::metatable_setup fx(L); - return stack::push>(L, detail::with_function_tag(), fx, cont); - } - - static int push(lua_State* L, T&& cont) { - stack_detail::metatable_setup fx(L); - return stack::push>(L, detail::with_function_tag(), fx, std::move(cont)); + return stack::push>(L, detail::with_function_tag(), fx, std::forward(args)...); } };