...
This commit is contained in:
@@ -104,7 +104,14 @@ int main()
|
||||
if (ri) { // should not be
|
||||
std::println("hmap_move['int_key'] = {}", ri.value());
|
||||
} else {
|
||||
std::println("cannot get value of hmap_move['int_key']");
|
||||
std::println("cannot get value of hmap_move['int_key'] as int");
|
||||
}
|
||||
|
||||
auto rd = hmap_move.get<double>("int_key");
|
||||
if (rd) { // should not be
|
||||
std::println("hmap_move['int_key'] = {}", rd.value());
|
||||
} else {
|
||||
std::println("cannot get value of hmap_move['int_key'] as double");
|
||||
}
|
||||
|
||||
ri = hmap_copy.get<int>("int_key");
|
||||
@@ -115,5 +122,11 @@ int main()
|
||||
}
|
||||
}
|
||||
|
||||
std::println("\n{:*^80}", " hmap size ");
|
||||
|
||||
std::println("hmap.size() = {}", hmap.size());
|
||||
std::println("hmap_move.size() = {}", hmap_move.size());
|
||||
std::println("hmap_copy.size() = {}", hmap_copy.size());
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user