🛠 Sometimes the conversion of sol::nested wrappers is not perfect.

This commit is contained in:
榆柳松 2023-06-17 22:43:25 +08:00
parent eab1430ccd
commit a631e99013

View File

@ -257,6 +257,10 @@ namespace sol { namespace stack {
return static_cast<actual>(r); return static_cast<actual>(r);
} }
} }
else if constexpr (!std::is_reference_v<X> && meta::is_specialization_of_v<X, nested>) {
using NestedX = typename meta::unqualified_t<X>::nested_type;
return stack_detail::unchecked_unqualified_get<NestedX>(L, index, tracking);
}
else { else {
return stack_detail::unchecked_unqualified_get<Tu>(L, index, tracking); return stack_detail::unchecked_unqualified_get<Tu>(L, index, tracking);
} }