I have a class. It has a member of unique_ptr.
class A
{
    std::unique_ptr<int> m;
};
I hope it works with the following statements
A a;
A b;
a = std::move(b);
std::swap(a, b);
How to make it?
According to the comments, I have a question. Is this compiler dependent? If I do nothing, it cannot pass compilation in VC++ 2012.
I tried before
struct A
{
    A() {}
    A(A&& a)
    {
        mb = a.mb;
        ma = std::move(a.ma);
    }
    A& operator = (A&& a)
    {
        mb = a.mb;
        ma = std::move(a.ma);
        return *this;
    }
    unique_ptr<int> ma;
    int mb;
};
But not sure if this is the best and simplest way.
 
    