Help with &&

Hi, I was looking at the tutorial of the function template std::make_pair. I don't recognize what the symbol && following the arguements type means. Does it mean reference? What is the difference between using & and && here?

1
2
  template <class T1, class T2>
  pair<V1,V2> make_pair (T1&& x, T2&& y);
Yes, this means reference. Specifically, a reference to a reference.
It allows you to do such things as this without the object being destroyed.

make_pair("x", Object(arg1, arg2, ...))
It is an rvalue reference; I am too lazy to type up a good explanation so you can try reading this stackoverflow post I googled:
http://stackoverflow.com/questions/5481539/what-does-t-double-ampersand-mean-in-c11
Thank you, Zhuge! The webpage you suggested is very helpful! I understand what double ampersand means now!

To Ispil: Thank you. But I'm not really sure if there is something like a reference to a reference in C plus plus? I mean, how can we make a reference pointing to another reference? References are quite different from pointers. They need to be initialized at declaration. After declaration, they are exactly the same as what they refer to. In other words, there is no dereferencing for references.
Indeed. In that case, I was mistaken.
Topic archived. No new replies allowed.