mirror of
https://github.com/BlackMATov/meta.hpp.git
synced 2025-12-16 14:09:02 +07:00
remove all get_as<T>, try_invoke with uresult instead optional
This commit is contained in:
@@ -41,7 +41,7 @@ TEST_CASE("meta/meta_manuals/enum/type") {
|
||||
for ( const meta::evalue& evalue : align_type.get_evalues() ) {
|
||||
fmt::print(" - {}/{}\n",
|
||||
evalue.get_name(),
|
||||
evalue.get_underlying_value_as<int>());
|
||||
evalue.get_underlying_value().get_as<int>());
|
||||
}
|
||||
|
||||
// Output:
|
||||
@@ -63,5 +63,5 @@ TEST_CASE("meta/meta_manuals/enum/usage") {
|
||||
CHECK(align_type.value_to_name(e) == "center");
|
||||
|
||||
// ... and back again
|
||||
CHECK(align_type.name_to_value_as<align>("center") == e);
|
||||
CHECK(align_type.name_to_value("center").get_as<align>() == e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user