In C++ what is the best way to return a function local std::string variable from the function?
std::string MyFunc() { std::string mystring(\"test\"); ret
Have you tried it? The string is copied when it's returned. Well that's the official line, actually the copy is probably optimised away, but either way it's safe to use.