Browse Source

meta: drop the meta<Type> function

Michele Caini 1 year ago
parent
commit
dbcc0baa7b
2 changed files with 0 additions and 52 deletions
  1. 0 33
      src/entt/meta/factory.hpp
  2. 0 19
      test/entt/meta/meta_factory.cpp

+ 0 - 33
src/entt/meta/factory.hpp

@@ -460,39 +460,6 @@ public:
     }
 };
 
-/**
- * @brief Utility function to use for reflection.
- *
- * This is the point from which everything starts.<br/>
- * By invoking this function with a type that is not yet reflected, a meta type
- * is created to which it will be possible to attach meta objects through a
- * dedicated factory.
- *
- * @tparam Type Type to reflect.
- * @param ctx The context into which to construct meta types.
- * @return A meta factory for the given type.
- */
-template<typename Type>
-[[nodiscard]] [[deprecated("use meta_factory directly instead")]] auto meta(meta_ctx &ctx) noexcept {
-    return meta_factory<Type>{ctx};
-}
-
-/**
- * @brief Utility function to use for reflection.
- *
- * This is the point from which everything starts.<br/>
- * By invoking this function with a type that is not yet reflected, a meta type
- * is created to which it will be possible to attach meta objects through a
- * dedicated factory.
- *
- * @tparam Type Type to reflect.
- * @return A meta factory for the given type.
- */
-template<typename Type>
-[[nodiscard]] [[deprecated("use meta_factory directly instead")]] auto meta() noexcept {
-    return meta<Type>(locator<meta_ctx>::value_or());
-}
-
 /**
  * @brief Resets a type and all its parts.
  *

+ 0 - 19
test/entt/meta/meta_factory.cpp

@@ -414,25 +414,6 @@ TEST_F(MetaFactory, Custom) {
     ASSERT_EQ(static_cast<int>(type.func("func"_hs).next().custom()), 3);
 }
 
-TEST_F(MetaFactory, Meta) {
-    entt::meta_ctx ctx{};
-
-    ASSERT_EQ(entt::resolve(entt::type_id<int>()), entt::meta_type{});
-    ASSERT_EQ(entt::resolve(ctx, entt::type_id<int>()), entt::meta_type{});
-
-    auto factory = entt::meta<int>();
-
-    ASSERT_NE(entt::resolve(entt::type_id<int>()), entt::meta_type{});
-    ASSERT_EQ(entt::resolve(ctx, entt::type_id<int>()), entt::meta_type{});
-    ASSERT_TRUE(entt::resolve(entt::type_id<int>()).is_integral());
-
-    factory = entt::meta<int>(ctx);
-
-    ASSERT_NE(entt::resolve(entt::type_id<int>()), entt::meta_type{});
-    ASSERT_NE(entt::resolve(ctx, entt::type_id<int>()), entt::meta_type{});
-    ASSERT_TRUE(entt::resolve(ctx, entt::type_id<int>()).is_integral());
-}
-
 TEST_F(MetaFactory, MetaReset) {
     using namespace entt::literals;