jeudi 1 décembre 2016

Do we need move and copy assignment

For a class A, can we use

A& operator=( A other ) { /* ... */ }

instead of

A& operator=( const A&  other ) { /* ... */ }
A& operator=( const A&& other ) { /* ... */ }

without worsening performance or other negative effects?

Aucun commentaire:

Enregistrer un commentaire