Today i came across a class with following layout (c++14)
class A {
//ctor
A(..some specific parameter) :..init some members .. {};
//copy ctor
A(A const&) = delete;
//copy assign op
A& operator=(A const&) = delete;
//move operator
A(A&&) = default;
//move assign op
A& operator=(A&&) = delete;
//dtor
~A() = default;
}
What could be the intention behind creating a default move consructor but deleting the move-assignment operator?
And what is the impact/restrictions when using the class?
Update: No I cannot share class details, however, the comments and answers are pointing to the right direction, it's all about ressource allocation and initialisation.
Thank you all soo much - you made my day!!!