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

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

html - Instapaper-like algorithm -

c# - How to execute a particular part of code asynchronously in a class -