Explorar o código

meta_handle: let meta_any decide on ctx-less constructors

Michele Caini hai 1 ano
pai
achega
dbee03f462
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/entt/meta/meta.hpp

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

@@ -695,7 +695,7 @@ struct meta_handle {
      */
     template<typename Type, typename = std::enable_if_t<!std::is_same_v<std::decay_t<Type>, meta_handle>>>
     meta_handle(Type &value)
-        : meta_handle{locator<meta_ctx>::value_or(), value} {}
+        : any{std::in_place_type<Type &>, value} {}
 
     /**
      * @brief Context aware copy constructor.