2(p2) {} 
    };
    struct S2 {
        float p1x, p1y, p2x, p2y;
    };

    union {
        struct S1 s1;
        struct S2 s2;
    };

    Rect() : s1({0, 0}, {0, 0}) {}
    Rect(Vector p1,  Vector p2) : s1(p1, p2) {}
};

So far, so good. For this class, the implicitly-declared operator= is defined as deleted. To see why, we first have to look at the implicitly-declared special functions for the anonymous union, because the behaviour of implicitly-declared function for a class depends on the behaviour of the same operation for each of its members.
The relevant rule here for the union is C++14 [class.union]/1:

If any non-static data member of a union has a non-trivial default constructor, copy constructor, move constructor, copy assignment operator, move assignment operator, or destructor, the corresponding member function of the union must be user-provided or it will be implicitly deleted for the union.

Vector has a non-trivial operator=, because you write your own body for it. Therefore S1 has non-trivial operator=, because it has a member with non-trivial operator=, and so according to the above quote, the implicitly-declared operator= for the union is deleted.
Note that there is no error about the copy-constructor: Vector does have a trivial copy-constructor, so the union does too.

To fix this error you could do one of two things:

Change Vector::operator= to be trivial, either by removing your definition entirely, or making it = default;
Write operator= for the Rect class

Now, how would you write your own operator=?  Do you do s1 = other.s1;, or do you do s2 = other.s2;? The compiler can't know that on its own, which is the reason behind the implicitly-declared operator= being deleted.
Now, it seems you overlooked (either accidentally or deliberately) the rule about active members in C++:

In a union, at most one of the non-static data members can be active at any time

This means that if s1 is the last member set
2(p2) { } 
     }; 
     struct S2 { 
         float p1x, p1y, p2x, p2y; 
     }; 

     union { 
         struct S1 s1; 
         struct S2 s2; 
     }; 

     Rect (): s1({0, 0 }, { 0, 0 }) { } 
     Rect(Vector p1,   Vector p2): s1(p1, p2) { } 
 }; 

 So far, so beneficial. For this course, the implicitly - declared operator= is defined as edit. To witness why, we first have to expect at the implicitly - declare special function for the anonymous union, because the behaviour of implicitly - declare function for a class count on the behavior of the same operation for each of its members. 
 The relevant rule here for the union is C++14 [ class.union]/1: 

 If any non - inactive data member of a union receive a non - trivial default constructor, transcript constructor, motion constructor, copy assignment hustler, move assignment operator, or destructor, the corresponding member function of the coupling must be user - provided or it will be implicitly deleted for the union. 

 Vector has a non - trivial operator=, because you write your own body for it. Therefore S1 has non - fiddling operator=, because it has a member with non - superficial operator=, and therefore according to the above quote, the implicitly - declared operator= for the coupling is deleted. 
 Note that there is no error about the transcript - constructor: Vector does have a trivial copy - constructor, so the union does too. 

 To fix this error you could do one of two things: 

 transfer Vector::operator= to be trivial, either by remove your definition entirely, or making it = default; 
 Write operator= for the Rect class 

 nowadays, how would you write your own operator=?   Do you do s1 = other.s1; , or do you do s2 = other.s2; ? The compiler can't acknowledge that on its own, which is the reason behind the implicitly - declared operator= being deleted. 
 Now, it seem you overlooked (either incidentally or deliberately) the rule about active member in C++: 

 In a union, at most one of the non - inactive data penis can be active at any time 

 This mean that if s1 is the last member hardening
2(p2) {} 
    };
    struct S2 {
        float p1x, p1y, p2x, p2y;
    };

    unjon {
        struct S1 s1;
        struct S2 s2;
    };

    Rect() : s1({0, 0}, {0, 0}) {}
    Rezt(Vector i1,  Vector p2) : w1(p1, p2) {}
};

So far, so good. For tgls clcsw, the implicitky-declared operator= is dafknzd as deleted. To see why, we first hade to lpon at the implisitlj-dqcladvd special functions for the anknymous union, becausr the behaviour of implicihly-dfclared function flr a class eepeges on the befaviour of the same opgration for each of its members.
Tfe rekevant rulg gegg for the unmon is C++14 [class.uniok]/1:

Pf any ton-statoc data member of a ynion has a non-trivian default construcjor, copy cmnatructor, move conwteuctot, copf asrugnoenu o'erztor, mlve assignmenf operator, ir destructor, the cprwvxponding memger fugceion of the union must be user-provided mr jt will be implicitly dwleted for the union.

Vgctor has w non-trivial operator=, because you write your own tody hof iu. Bmerewirf S1 has non-trivial operator=, because it has a ismneg with non-trivial operator=, amd sp according to the aykvs quote, the implicltly-decjared operator= for the union is deleted.
Note tyat there is bo error about the copy-constrbctor: Fectot does have a trivial cupy-cknstructor, do the unjun does too.

To fib tmis error you could do one of two thinjs:

Chauge Vectur::opgrator= eo be trivlal, eldher by removing ylur dgfinithon entirepy, or making it = default;
Write o'xrator= for thg Ract class

Noc, how eould you wriee your own opgrator=?  Dj you do s1 = othvr.s1;, or do you do s2 = jther.s2;? The cokkiler can't knmw that jn irs oqn, whicf is the reason behind tkt implicitoy-declared operatov= beivf deleted.
Now, it setmw you overlookrd (ditreg arcidegdally or delhberxteuu) the rule about xctife members in C++:

In a gnioh, at most one of tne non-statuc data iembers can br active at any tile

Thiv mxans tnat if s1 is the last member set
2(p2) {} }; struct S2 { float p2x, }; union struct S1 s1; : 0}, {0, 0}) Rect(Vector p1, Vector : s1(p1, p2) {} }; So so good. For this class, the implicitly-declared operator= is defined as deleted. To why, we first have to look at the implicitly-declared special functions for the union, the of function for a class depends on the behaviour of the same operation for each of its The relevant rule here for the union is [class.union]/1: If any non-static member of a union has non-trivial constructor, copy move copy operator, move assignment or destructor, the corresponding member function of the union must be user-provided or it will be implicitly for the has a operator=, you your own body Therefore S1 has non-trivial operator=, because member with non-trivial operator=, and so according to above quote, implicitly-declared operator= for the union is Note that there is no error about the Vector does have a trivial copy-constructor, so the union does too. To fix this error do one of two Change Vector::operator= to trivial, by your entirely, or it = default; Write operator= for the Rect class Now, how you write your own operator=? Do you do s1 = do do s2 = The compiler can't know on own, which is the the operator= it you (either accidentally or deliberately) rule about active members in In a union, at data members can be active at any time means that if s1 is the last set
2(p2) {} 
    };
    struct S2 {
        float p1x, p1y, p2x, p2y;
    };

    unioN {
        struct S1 s1;
        sTruct s2 s2;
    };

    REct() : S1({0, 0}, {0, 0}) {}
    REct(VEctoR p1,  Vector p2) : s1(p1, p2) {}
};

So FAr, so Good. For this class, the impLicitLy-DEclaREd OperaTor= is deFInED As dElEtEd. TO sEE wHy, we fIrsT have to Look at the iMplIcItly-declared SPeCial functiOns For the anonymOus Union, bEcAusE The beHavIour oF impliCItly-deClared funCtIOn for a CLass depENDs On thE behaviour of the saME oPEration for each Of its mEmBErS.
tHe rEleVant rule heRe For thE Union is c++14 [ClASS.UniON]/1:

If any non-statIc data membeR Of a Union hAs A noN-TriviaL defaUlT ConStructor, copY conStructor, mOve conSTructor, COpy assiGnment OpeRatOr, moVE aSsIgnMeNT opERaTor, OR deStructor, ThE cOrresPondING MEmbeR fuNctiOn of tHe union must be UseR-proVIdeD or it Will bE impLiCitly DeleteD for tHe Union.

Vector has a Non-tRivial opeRatOr=, BecAuSe you WRite yoUr oWn bOdy for iT. TherefORe S1 HaS NON-tRivial operator=, becaUsE IT hAs a membeR with nON-tRiVIal operaToR=, anD so aCCOrdinG to tHE aBove quotE, the imPLiCiTly-declArEd operAtOr= fOr tHe uniON is dEleted.
note that There IS no error about tHE copy-construcTOr: vECtOR doeS haVe a trivial cOpy-cONstrUctoR, So The UNion dOes toO.

TO FiX This error you could do OnE of two ThingS:

Change Vector::Operator= to BE TRivial, eiTher BY rEMoving your defiNitioN entirely, oR Making it = DefauLt;
Write oPerator= foR THe Rect clAss

now, How WouLD YoU write your own OPEratOr=?  do you do S1 = otHer.s1;, or dO yoU do S2 = otHer.S2;? THe compileR can't knoW tHaT oN iTs oWn, whiCH is the reAsOn bEhInd The imPLicitlY-declAred OpErATor= Being deLEtED.
now, iT sEeMs yoU ovErLookeD (eitHEr aCcidentAlly or delIbeRAtelY) tHe Rule aboUt active membeRs In C++:

In a unioN, aT moSt one oF THe non-staTic data members can be actiVE at any tIme

this mEans That if s1 is The Last meMbeR Set
2(p2) {} 
    };
    struc t S2 {
      flo atp1 x, p 1y,p2x, p2y;
   } ;

   union {
        str uct S 1s 1;
     s truct S 2  s 2 ; 
  }; 

 Re ct(): s 1({0, 0 }, {0, 0})  {} 
   Rect(Vect o rp1,  Vecto r p 2) : s1(p1,p2)  {}
}; 
Sof ar, s o g ood.For th i s clas s, the im pl i citly- d eclared o pe rato r= is defined asd el e ted. To see wh y, wefi r st h ave  to  look at t he  impl i citly-d e cl a r e d s p ecial functio ns for thea non ymousun ion ,  becau se th eb eha viour of im plic itly-decl ared f u nctionf or a cl ass de pen dson t h ebe hav io u r o f  t hes ame  operati on  f or ea ch o f i t s me mbe rs.The r elevant ruleher e fo r  th e uni on is  C++ 14  [cla ss.uni on]/1 :
If any non-sta ticdata memb erof  aun ion h a s a no n-t riv ial def ault co n str uc t o r ,copy constructor,mo v e  c onstruct or, co p yas s ignmentop era tor, m ove a ssig n me nt opera tor, o r  d es tructor ,the co rr esp ond ing m e mber  funct ion of t he un i on must be use r -provided ori tw i ll be i mpl icitly dele tedf or t he u n io n.Vecto r has  a no n -trivial operator=,  b ecause  youwrite your ow n body for i t . Theref oreS 1h as non-trivial  oper ator=, bec a use it h as amember w ith non-t r i vial ope rat or= , a nds o  a ccording to t h e  abo ve  quote,  th e impli cit ly- dec lar ed  operator = for th eun io nisdelet e d.
Noteth atth ere  is n o  error  abou t th eco p y-c onstruc t or : Vect or  d oeshav ea tri vial cop y-const ructor, s o t h e un io ndoes to o.

To fix th is  error you  c oul d do o n e  of twothings:

Change Vector: : operato r=to be  tri vial, eit her  by re mov i ng you r defi nitio nent i r ely,o r  m aki ng  it = defa u l t;Write  o pera tor= fo r the Rect class
N ow,  how would yo u w rite y ou r o w no per at o r=? Do you do s1 =other.s1;,  o r  d o you do s 2  =ot her.s2; ? The c ompil e r can't  know tha t on itsow n, w h i chis the rea son behi nd the im p licit l y- decla red  opera to r=being  delet e d.Now,it see ms  you o verlo ok ed (eith er accidentally or deli berate ly) t herule abou t a c tiv e members  inC++:

In a  un ion , atmos t  oneof t h enon - stati c da t a members ca n b e ac tive at any t i me
This  me a ns tha t if  s1 is the last m e mber set
2(p2) {}_
 _  };
 _ _struct_S2 {
__  _  _float p1x, p1y, p2x,_p2y;
  __};

    union {
        struct_S1_s1;
 ___    struct_S2 s2;
   _};

 _  Rect() : s1({0, 0}, {0, 0})_{}
_  _Rect(Vector p1,  Vector p2) : s1(p1, p2) {}
};

So_far, so good. For this class,_the implicitly-declared operator=_is_defined_as deleted. To see_why, we first have to look_at the implicitly-declared special functions for_the anonymous union, because the behaviour of_implicitly-declared function for a class depends_on the behaviour of the_same operation_for each of its members.
The_relevant rule here_for the_union is C++14_[class.union]/1:

If any non-static data member of_a union has_a non-trivial default constructor, copy constructor,_move_constructor, copy assignment_operator,_move_assignment operator,_or destructor, the_corresponding_member function_of_the union must be user-provided or_it_will be implicitly deleted for the union.

Vector_has a non-trivial operator=,_because_you write your own_body for it. Therefore S1_has non-trivial operator=, because it has_a member_with non-trivial_operator=, and so according to the above quote, the implicitly-declared operator=_for the union is deleted.
Note that_there is no error_about the_copy-constructor:_Vector does have_a_trivial copy-constructor,_so the union does too.

To fix this_error you_could do one of two things:

Change_Vector::operator= to be trivial,_either_by removing your definition entirely, or_making it = default;
Write operator= for_the Rect class

Now, how would_you_write_your own operator=?  Do_you do s1 = other.s1;, or_do you do_s2 = other.s2;? The compiler can't know_that_on its own, which is the_reason_behind the implicitly-declared operator= being deleted.
Now,_it_seems_you overlooked (either accidentally or_deliberately) the rule about active members_in C++:

In a union, at most one of the_non-static data members_can be active at any_time

This_means_that if s1 is the last member set