diff --git a/include/sol/stack_check_unqualified.hpp b/include/sol/stack_check_unqualified.hpp index 0c87d9a0..1cf606ca 100644 --- a/include/sol/stack_check_unqualified.hpp +++ b/include/sol/stack_check_unqualified.hpp @@ -218,6 +218,7 @@ namespace sol { namespace stack { } else if constexpr (is_unique_usertype_v) { using element = unique_usertype_element_t; + using element_no_cv = meta::unqualified_t; using actual = unique_usertype_actual_t; const type indextype = type_of(L_, index); tracking.use(1); @@ -229,7 +230,7 @@ namespace sol { namespace stack { return true; } int metatableindex = lua_gettop(L_); - if (stack_detail::check_metatable>(L_, metatableindex)) { + if (stack_detail::check_metatable>(L_, metatableindex)) { void* memory = lua_touserdata(L_, index); memory = detail::align_usertype_unique_destructor(memory); detail::unique_destructor& pdx = *static_cast(memory);