I've been trying to fully understand move semantics, but I have one question, as different examples show different things. Say we have a class Foo that has a string member str_. To define the move constructor, should I define it like this:
Foo(Foo&& foo) : str_(foo.str_) { }
or this:
Foo(Foo&& foo) : str_(std::move(foo.str_)) { }
Also, would I need to set the members of the object i am moving from to a blank value? How would I do so without constructing another string, essentially nullifying the expense saved by using a move constructor in the first place?