0

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

What is this operator?

McLovin
  • 3,295
  • 7
  • 32
  • 67

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
  • 945
  • 7
  • 8