Browse Source

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

Michele Caini 5 years ago
parent
commit
d0b93f565a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/entt/meta/factory.hpp

+ 1 - 1
src/entt/meta/factory.hpp

@@ -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) {