void foo(const std::string& str);
foo(std::move(localstr));
If I know that I won't use this string anymore, will I have any gain by moving it if the function expects reference?
In general, there are so many advices now on the web for using parameters by value to be able to gain from moves, but I can't really find any practical usage of this so far. For me it seems that I still better declare my functions as const or non-const references.