next up previous contents index
Next: Minimale Klassenschnittstellen Up: 50 Ways to Improve Previous: Member-Zuweisung im = Operator

Selbstzuweisung abtesten

 

    C& C::operator=(const C& rhs)
    { if (this == &rhs)
      return *this;
      ...
    }

Gründe:


next up previous contents index
Next: Minimale Klassenschnittstellen Up: 50 Ways to Improve Previous: Member-Zuweisung im = Operator

Peter Pfahler, 1997