From 645ae86bec16ee986236039d5d16f385b7173341 Mon Sep 17 00:00:00 2001 From: Eugen Cazacu Date: Fri, 29 Nov 2024 09:16:26 +0200 Subject: [PATCH] Fix issue 1643 shared_ptr& as parameter not working --- include/sol/stack_check_unqualified.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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);