meta: prop key is returned by const reference rather than by copy

This commit is contained in:
Michele Caini
2021-03-08 15:19:13 +01:00
parent 1512fbae55
commit d0b93f565a

View File

@@ -80,7 +80,7 @@ class meta_factory<Type, Spec...>: public meta_factory<Type> {
static internal::meta_prop_node node{
nullptr,
[]() -> meta_any {
return std::get<0>(property);
return meta_any{std::in_place_type<const Key &>, std::get<0>(property)};
},
[]() -> meta_any {
if constexpr(sizeof...(Value) == 0) {