class Foo
{
public:
Foo() : m_bar(6) { }
Foo(Foo &&source) : m_bar(std::move(source.m_bar)) {}
void Quux();
private:
int m_bar;
};
void Foo::Quux()
{
m_bar = 10;
}
Next, highlight "m_bar" in Foo::Quux and do "Refactor -> Rename" to "m_zot." Note that the rvalue-refrence version of the constructor was only partially updated; "source.m_bar" remains, should have been "source.m_zot". Here's what I get:
class Foo
{
public:
Foo() : m_zot(6) { }
Foo(Foo &&source) : m_zot(std::move(source.m_bar)) {} // s/b m_zot(std::move(source.m_zot))
void Quux();
private:
int m_zot;
};
void Foo::Quux()
{
m_zot = 10;
}