diff --git a/sol/table_core.hpp b/sol/table_core.hpp index ed85d210..8004ebd2 100644 --- a/sol/table_core.hpp +++ b/sol/table_core.hpp @@ -263,7 +263,7 @@ namespace sol { template basic_table_core& new_usertype(const std::string& name, Args&&... args) { usertype utype(std::forward(args)...); - set_usertype(name, std::move(utype)); + set_usertype(name, utype); return *this; } @@ -276,7 +276,7 @@ namespace sol { template basic_table_core& new_usertype(const std::string& name, constructors ctor, Args&&... args) { usertype utype(ctor, std::forward(args)...); - set_usertype(name, std::move(utype)); + set_usertype(name, utype); return *this; }