Allows avoiding a redundant initial element. We can also remove the
const from the std::function rvalue to allow a std::move to take effect.
We can also use the std::string_view constructor for std::string to
avoid an unnecessary strlen() call.

We can use the result of the first lookup to avoid doing another
redundant lookup to perform the erasure.
While we're at it, we can use std::string's std::string_view constructor
in order to avoid an unnecessary strlen() call.

By using the std::string_view constructor for std::string, we can avoid
the char* constructor, which would require a strlen call in order to
determine the string size. This also allows it to work with
non-null-terminated strings.