c++ - Operator overloading -
why overloaded operator= mandated member function ($13.5.3), not compound assignment operator e.g. operator+= ($13.5.2)? overlooking here?
a copy assignment operator=
, member, provided compiler if user doesn't define one. believe simplicity , avoid unexpected ambiguities made requirement operator=
can't defined free function.
conversion operators take care of case when want assign user-defined type built-in type.
Comments
Post a Comment