From 23f21787edc2e694c4dd53a235fd48ba571ae288 Mon Sep 17 00:00:00 2001 From: BlackMATov Date: Sun, 6 Nov 2022 20:09:06 +0700 Subject: [PATCH] little example fixes --- manuals/meta_examples/uvalue_example.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manuals/meta_examples/uvalue_example.cpp b/manuals/meta_examples/uvalue_example.cpp index 6ed9ae5..776e3ef 100644 --- a/manuals/meta_examples/uvalue_example.cpp +++ b/manuals/meta_examples/uvalue_example.cpp @@ -84,13 +84,13 @@ TEST_CASE("meta/meta_examples/uvalue/usage") { CHECK(s->get_area() == 200); } - // upcasting is supported for pointers too + // also, upcasting is supported for pointers rectangle rect{3, 5}; val = ▭ CHECK(val.get_as()->get_area() == 15); CHECK(val.get_type() == meta::resolve_type()); - // but we can use try_get_as for pointers too + // and we can use try_get_as for pointers too CHECK(val.try_get_as()); if ( shape* s = val.try_get_as() ) { CHECK(s->get_area() == 15);