0

Why does push_back() take Object&& as parameter, and not simply a reference of the object, like Object&?

What is this operator?

Pilpel
  • 3,137
  • 6
  • 30
  • 63

1 Answers1

-2

That would be the move operator, wich is new since c++11. This allows you to move objects into your vector instead of copying them. Google search for a more detailed descriptiob of the move operator.

Teimpz
  • 925
  • 7
  • 8