lundi 5 juin 2017

vector

in old c++ style, I always use vector < shared_ptr < string> > or vector < string* > to avoid memory copy when constructing a big vector which holds many string objects.

Since c++11, c++ has rvalue and move semantics, can I use vector < string > now?

I am using gcc 7.1.0 and clang 3.6 with c++ 14 option.

Aucun commentaire:

Enregistrer un commentaire