diff --git a/sol/usertype_metatable.hpp b/sol/usertype_metatable.hpp index fb2bcb45..6685f862 100644 --- a/sol/usertype_metatable.hpp +++ b/sol/usertype_metatable.hpp @@ -184,6 +184,11 @@ namespace sol { mustindex = true; return; } + else if (shimname == name_of(meta_function::new_index)) { + newindexfunc = call; + mustindex = true; + return; + } l[index] = usertype_detail::make_reg(std::forward(n), make_func(std::forward(f))); ++index; }();