1

I have searched for a specific answer for my question and i couldn't find one , so here is my question:

  1. I know that if we have operator+ and operator+= += should be a method and + a non-member function but what if we didn't have operator+= , should operator+ be friend then ?

  2. I also know that symmetrical operators should be 'non-members' and 'friends' if needed , and I can see how == != are symmetrical operators, but what about < , > , >= , <= are they symmetric? and why ? I mean A<B is not the same as B<A , so are they symmetric? should they be declared as non-members? friends?

4

0 回答 0