MaybeView

Note: this is based on the version of Ox in following revision in the Nostalgia repo : 1b629da8fc658a85f07b5209f2791a5ebdf79fa1 Problem In C++, hash maps are often used with strings as keys. This would typically look something like this. std::unordered_map<std::string, int> ages; ages["Jerry Smith"] = 54; And here is an example of a lookup: int age = ages["Jerry Smith"]; There is a hidden inefficiency here. The lookup operator does not take a std::string_view or a C string....

April 24, 2024 · 2 min · Gary Talent