Please use `const std::string& str`.