* meta_any: convert -> allow_cast
* support for const references
* as_cref_t policy
This commit is contained in:
Michele Caini
2020-12-16 15:29:28 +01:00
parent 3dac65a012
commit c52f16f5b8
11 changed files with 178 additions and 160 deletions

View File

@@ -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.);