any: remove deprecated functions

This commit is contained in:
skypjack
2025-11-24 15:52:15 +01:00
parent de32688d46
commit ea3de5499e
2 changed files with 3 additions and 8 deletions
-5
View File
@@ -354,11 +354,6 @@ public:
return *static_cast<const type_info *>(vtable(request::info, *this, nullptr));
}
/*! @copydoc info */
[[deprecated("use ::info instead")]] [[nodiscard]] const type_info &type() const noexcept {
return info();
}
/**
* @brief Returns an opaque pointer to the contained instance.
* @return An opaque pointer the contained instance, if any.
+3 -3
View File
@@ -52,7 +52,7 @@ TEST(Any, Empty) {
ASSERT_FALSE(any);
ASSERT_FALSE(any.owner());
ASSERT_EQ(any.policy(), entt::any_policy::empty);
ASSERT_EQ(any.type(), entt::type_id<void>());
ASSERT_EQ(any.info(), entt::type_id<void>());
ASSERT_EQ(entt::any_cast<double>(&any), nullptr);
ASSERT_EQ(any.data(), nullptr);
}
@@ -81,7 +81,7 @@ TEST(Any, SBO) {
ASSERT_TRUE(any);
ASSERT_TRUE(any.owner());
ASSERT_EQ(any.policy(), entt::any_policy::embedded);
ASSERT_EQ(any.type(), entt::type_id<char>());
ASSERT_EQ(any.info(), entt::type_id<char>());
ASSERT_EQ(entt::any_cast<double>(&any), nullptr);
ASSERT_EQ(entt::any_cast<char>(any), 'c');
}
@@ -93,7 +93,7 @@ TEST(Any, NoSBO) {
ASSERT_TRUE(any);
ASSERT_TRUE(any.owner());
ASSERT_EQ(any.policy(), entt::any_policy::dynamic);
ASSERT_EQ(any.type(), entt::type_id<fat>());
ASSERT_EQ(any.info(), entt::type_id<fat>());
ASSERT_EQ(entt::any_cast<double>(&any), nullptr);
ASSERT_EQ(entt::any_cast<fat>(any), instance);
}