C++ return a std::string & Languages

C++ return a std::string &

the function above is unsafe clearly. Following is another version. I have some questions: the compiler(gcc), in the second version, doesn't give me any warning. Is it safe? I just think that compiler(or something?) will create a temporary variable to hold the return of expression std::to_string(vlu) + "something". So the...
Read More