Go back to Richel Bilderbeek's homepage.
Go back to Richel Bilderbeek's C++ page.
operator= is an operator, that is called the assign operator and assignment operator.
struct MyClass |
In class design, have assignment operators return a reference to *this [1].
In class design, also handle assignment to self [2]. To handle assignment to self there are two techniques: 'identity test' or 'copy and swap'.
struct MyClass |
struct MyClass |
Go back to Richel Bilderbeek's C++ page.
Go back to Richel Bilderbeek's homepage.