The compiler will optimize it.
Except in some situations, such as:
std::string f(bool cond = false)
{
std::string first("first");
std::string second("second");
// the function may return one of two named objects
// depending on its argument. RVO might not be applied
if(cond)
return first;
else
return second;
}
Of course there can be some old compilers, which can call copy constructor. But you shouldn't worry about it with modern compilers.