jeudi 3 décembre 2015

standard container swap overloads

The standard library containers don't have a swap overload for rvalue reference.
Is this an oversight, or is there a rational behind it?

In addition to

void map::swap( map& );

there could be a

void map::swap( map&& );

because stealing the guts of a temporary should not be a problem?

Aucun commentaire:

Enregistrer un commentaire