meta:
* meta_any: convert -> allow_cast * support for const references * as_cref_t policy
This commit is contained in:
@@ -36,7 +36,7 @@ TEST(Lib, Meta) {
|
||||
ASSERT_EQ(pos.type().data("y"_hs).get(pos).cast<int>(), 3);
|
||||
|
||||
ASSERT_EQ(vel.type().data("dx"_hs).type(), entt::resolve<double>());
|
||||
ASSERT_TRUE(vel.type().data("dy"_hs).get(vel).convert<double>());
|
||||
ASSERT_TRUE(vel.type().data("dy"_hs).get(vel).allow_cast<double>());
|
||||
ASSERT_EQ(vel.type().data("dx"_hs).get(vel).cast<double>(), 0.);
|
||||
ASSERT_EQ(vel.type().data("dy"_hs).get(vel).cast<double>(), 0.);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user