Are the move semantics used in Example A necessary, and which struct is superior?
Example A:
struct A { int a; A( int a ) : a( std::move(a) ){ } };
Example B:
struct B { int b; B( const int& b ) : b( b ){ } };
Aucun commentaire:
Enregistrer un commentaire