0

I land into std::vector header and saw somethings which I do not understand.

    void push_back(_Ty&& _Val)

I can understand pointer to pointer, but is there anythings like reference to reference. What purpose it will serve?

May be I am asking very basic question, but this is something I see first time.

Pranit Kothari
  • 9,721
  • 10
  • 61
  • 137

1 Answers1

4

That isn't a reference to a reference — such a thing doesn't exist. It's an r-value reference, which is new to C++11. There are plenty of references (excuse the pun) to this concept online (e.g., here).

Marcelo Cantos
  • 181,030
  • 38
  • 327
  • 365
  • Thanks. C++ 11 seems to having lots of changes.. if STL is also changed according to it learning it is not optional. – Pranit Kothari Jun 27 '13 at 12:38
  • @ss7don: There are many changes between C++03 and C++11. Most of them were added in order to make C++ programming easier, especially for newbies and non-experts. However almost everything you already know about C++03 also applies in C++11. – John Dibling Jun 27 '13 at 13:07