1) Using the string as an id (will not be modified). Passing it in by const reference is probably the best idea here: (std::string const&)
...
4) Sending the string into the function and the caller of the function will never use the string again. Using move semantics might be an option (std::string &&)
However;
This means in C++11 we can get better performance by using pass-by-value approach when:
The parameter type supports move semantics - All standard library components do in C++11
The cost of move constructor is much cheaper than the copy constructor (both the time and stack usage).
Inside the function, the parameter type will be passed to another function or operation which supports both copy and move.
It is common to pass a temporary as the argument - You can organize you code to do this more.
https://stackoverflow.com/questions/10789740/passing-stdstring-by-value-or-reference
However;
More info at https://codereview.stackexchange.com/questions/32842/passing-parameters-by-reference