Are there best practices for function names in that case where an in-place and an out-of-place function exists and they can not be distinguished using the parameters?
Example: Suppose I have a function to make a string uppercase:
void toUppercase(std::string & s); // modify s directly, in-place
void toUppercase(const std::string & s, std::string & result); // result will contain the modified string
std::string toUppercase(const std::string & s); // return the modified string
Functions 1 and 2 can be distinguished by C++ even if they have the same name, but 1 and 3 cannot. What names would make it clear to the user which function does what? Are there maybe any library examples where this problem has been solved in some way?