Browse Source

meta: meta_any::allow_cast propagates the context now

Michele Caini 3 years ago
parent
commit
223a8628e3
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/entt/meta/meta.hpp

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

@@ -450,7 +450,7 @@ public:
     template<typename Type>
     [[nodiscard]] meta_any allow_cast() const {
         if constexpr(std::is_reference_v<Type> && !std::is_const_v<std::remove_reference_t<Type>>) {
-            return {};
+            return meta_any{meta_ctx_arg, *ctx};
         } else {
             auto target = internal::resolve<std::remove_cv_t<std::remove_reference_t<Type>>>(internal::meta_context::from(*ctx));
             return allow_cast({*ctx, target});