#include <iostream>
using namespace std;

class A{
public:
    int a;

    A(int i){a = i;}

    A(const A& rhs) // copy constructor
    {
        a = 2;
    }

    A(const A&& rhs) // move constructor
    {
        a = 3;
    }

};

void print(A a)
{
    cout << a.a << endl;
}

A createA()
{
    A a(1);
    if( false )
        return A(1);
    else
        return a;
}

int main(){

    A a = createA();
    print(a);// This will invoker copy constructor and output is 2 

    print(createA()); // This should invoke move constructor because this object here is rvalue right?
}
