mirror of
https://github.com/BlackMATov/meta.hpp.git
synced 2025-12-15 11:52:08 +07:00
fix gcc warnings
This commit is contained in:
@@ -81,6 +81,7 @@ TEST_CASE("meta/meta_examples/uvalue/usage") {
|
||||
// but we can use try_get_as for safe access
|
||||
CHECK(val.try_get_as<shape>());
|
||||
if ( shape* s = val.try_get_as<shape>() ) {
|
||||
CHECK(s->get_area() == 200);
|
||||
}
|
||||
|
||||
// upcasting is supported for pointers too
|
||||
@@ -92,5 +93,6 @@ TEST_CASE("meta/meta_examples/uvalue/usage") {
|
||||
// but we can use try_get_as for pointers too
|
||||
CHECK(val.try_get_as<shape*>());
|
||||
if ( shape* s = val.try_get_as<shape*>() ) {
|
||||
CHECK(s->get_area() == 15);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user