diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2025-03-24 18:10:30 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2025-03-24 18:11:46 +0000 |
commit | ae99a2124da32e4d2474e6dc6cf54322b688b743 (patch) | |
tree | 2f447bf5aaae5b13038e04b8d5d154d802775ec3 /test | |
parent | Add Renderable typed collection to GameState worldObjects (diff) | |
download | ilt-ae99a2124da32e4d2474e6dc6cf54322b688b743.tar.bz2 ilt-ae99a2124da32e4d2474e6dc6cf54322b688b743.tar.xz ilt-ae99a2124da32e4d2474e6dc6cf54322b688b743.zip |
Use is_base_of_v instead of is_convertible_v to choose OtherObjects
Diffstat (limited to 'test')
-rw-r--r-- | test/test-collection.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/test-collection.cpp b/test/test-collection.cpp index a399845..90a3bd1 100644 --- a/test/test-collection.cpp +++ b/test/test-collection.cpp @@ -113,6 +113,10 @@ BOOST_AUTO_TEST_CASE(a_sub) BOOST_AUTO_TEST_CASE(filter) { + static_assert(TestCollection::idx<Sub>() == 0); + static_assert(TestCollection::idx<const Sub>() == 0); + static_assert(TestCollection::idx<Sub1>() == 0); + static_assert(TestCollection::idx<const Sub1>() == 0); create<Base>(); BOOST_CHECK_EQUAL(1, apply<Base>(&Base::yes)); BOOST_CHECK_EQUAL(0, apply<Sub>(&Base::yes)); |