diff --git a/sol/function_types_usertype.hpp b/sol/function_types_usertype.hpp index ccf884d2..8c0d6f43 100644 --- a/sol/function_types_usertype.hpp +++ b/sol/function_types_usertype.hpp @@ -175,10 +175,14 @@ struct fail_on_error : base_function { virtual int operator()(lua_State* L) override { return prelude(L); } + + ~fail_on_error() { + + } }; inline fail_on_error& failure_on_error() { - static fail_on_error f; + static fail_on_error f{}; return f; } } // function_detail diff --git a/sol/state_view.hpp b/sol/state_view.hpp index 35c3899b..2545270d 100644 --- a/sol/state_view.hpp +++ b/sol/state_view.hpp @@ -50,8 +50,8 @@ private: table reg; global_table global; public: - typedef typename global_table::iterator iterator; - typedef typename global_table::const_iterator const_iterator; + typedef global_table::iterator iterator; + typedef global_table::const_iterator const_iterator; state_view(lua_State* L): L(L), diff --git a/sol/usertype.hpp b/sol/usertype.hpp index ebeb3b81..15023dcc 100644 --- a/sol/usertype.hpp +++ b/sol/usertype.hpp @@ -375,6 +375,7 @@ private: newindexfunc = functions.back().get(); break; case meta_function::construct: + constructfuncname = name.c_str(); constructfunc = function_detail::usertype_call<N>; break; default: