Return rvalue reference vs return by value

Viewed 166

Let's consider the following code:

class Test{
public:
Test method(){
Test t; 
return std::move(t);
}

Test&& methoda2(){
Test t; 
return std::move(t);
}

What is difference between those methods?

0 Answers
Related