You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Additionally, the example of returning a string by value should be removed because it's no longer accurate in C++11. The code would invoke std::basic_string's move constructor instead.
string call_copy(string myString) //copy constructor is called to create temporary copy of myString local to call_copy
{
return myString; //copy constructor is called to return myString by value
}
We might be ok to remove the bad example after adding Chris's suggestion above.
Clarify what happens in each of the situations below.
The text was updated successfully, but these errors were encountered: