We can just reference the pairs instead of taking them by value, avoiding copying std::string instances.