|
|
@@ -291,10 +291,13 @@ template<typename Type>
|
|
|
node.from_void = +[](const meta_ctx &ctx, void *elem, const void *celem) {
|
|
|
if(elem && celem) { // ownership construction request
|
|
|
return meta_any{ctx, std::in_place, static_cast<std::decay_t<Type> *>(elem)};
|
|
|
- } else if(elem) {
|
|
|
+ }
|
|
|
+
|
|
|
+ if(elem) { // non-const reference construction request
|
|
|
return meta_any{ctx, std::in_place_type<std::decay_t<Type> &>, *static_cast<std::decay_t<Type> *>(elem)};
|
|
|
}
|
|
|
|
|
|
+ // const reference construction request
|
|
|
return meta_any{ctx, std::in_place_type<const std::decay_t<Type> &>, *static_cast<const std::decay_t<Type> *>(celem)};
|
|
|
};
|
|
|
}
|