jeudi 1 mars 2018

Compiler-generated move member functions on static data members

In Effective Modern C++, item 17 (Understand special member function generation), Scott Meyers said that the generated special move member functions (move constructor and move assignment operator) perform “memberwise moves” on the non-static data members of the class.

The move operations are generated only if they’re needed, and if they are generated, they perform “memberwise moves” on the non-static data members of the class.

I tried to understand the non-static condition but I couldn't, can anyone explain to me why can't they perform that on static data members?

Aucun commentaire:

Enregistrer un commentaire