meta: drop meta_any_policy

This commit is contained in:
Michele Caini
2025-03-20 09:21:38 +01:00
parent 5ccb46383c
commit fd015edb98
2 changed files with 2 additions and 5 deletions

View File

@@ -159,9 +159,6 @@ private:
bool const_only{};
};
/*! @brief Possible modes of a meta any object. */
using meta_any_policy [[deprecated("use any_policy instead")]] = any_policy;
/*! @brief Opaque wrapper for values of any type. */
class meta_any {
using vtable_type = void(const internal::meta_traits op, const meta_ctx &, const void *, void *);

View File

@@ -154,7 +154,7 @@ TEST_F(MetaAny, SBO) {
ASSERT_TRUE(any);
ASSERT_TRUE(any.base().owner());
ASSERT_EQ(any.policy(), entt::meta_any_policy::embedded);
ASSERT_EQ(any.policy(), entt::any_policy::embedded);
ASSERT_FALSE(any.try_cast<std::size_t>());
ASSERT_EQ(any.cast<char>(), 'c');
ASSERT_NE(any.data(), nullptr);
@@ -168,7 +168,7 @@ TEST_F(MetaAny, NoSBO) {
ASSERT_TRUE(any);
ASSERT_TRUE(any.base().owner());
ASSERT_EQ(any.policy(), entt::meta_any_policy::dynamic);
ASSERT_EQ(any.policy(), entt::any_policy::dynamic);
ASSERT_FALSE(any.try_cast<std::size_t>());
ASSERT_EQ(any.cast<fat>(), instance);
ASSERT_NE(any.data(), nullptr);