class Vector
{
    float x;
    float y;

public:
    Vector(float x, float y) : x(x), y(y) {}
    Vector& operator = (const Vector& v) { x = v.x; y = v.y; return *this; }
    //Vector(Vector&&) = default;
};


class Rect
{
public:
    union {
        struct {
            Vector p1, p2;
        } ;

        struct {
            float p1x, p1y, p2x, p2y;
        } ;
    } ;


    Rect() : p1(0, 0), p2(0, 0) {} 
    Rect(Vector& p1,  Vector& p2) : p1(p1), p2(p2) {}

    Rect& operator=(const Rect& other) {
        p1 = other.p1 ; 
        p2 = other.p2 ;
        return *this ;
    }

    /*Rect(const Rect&) = default;
    Rect& operator=(const Rect&) = default;
    Rect& operator=(Rect&&) = default;
    Rect(Rect&&) = default;*/
};


int main()
{
    Rect test = Rect();
    test = Rect();
    return 0;
}