lundi 24 août 2015

Copy initialization is effective with move in C++11?

Copy initialization is when Hello is created in memory and then being used copy constructor to initialize s, right?

std::string s = std::string("Hello")

After C++11 where move semantics is introduced can I say that the code above is as effective (eliminates copy) as in this case:

std::string s("Hello");

Aucun commentaire:

Enregistrer un commentaire