usertype destructor needs to be of the right type for non-const values

This commit is contained in:
ThePhD 2018-09-28 04:43:06 -07:00
parent 72b9d91c14
commit 015ef6a37a
No known key found for this signature in database
GPG Key ID: 1509DB1C0F702BFA

View File

@ -191,7 +191,7 @@ namespace sol {
return &detail::unique_destruct<T>; return &detail::unique_destruct<T>;
} }
else if constexpr (!std::is_pointer_v<T>) { else if constexpr (!std::is_pointer_v<T>) {
return &detail::unique_destruct<T>; return &detail::usertype_alloc_destruct<T>;
} }
} }
else { else {