Anarki Anarki - 6 months ago 86
C++ Question

C++ Double Address Operator? (&&)

I am reading STL source codes and I have no idea what && address operator is supposed to do. Here is a code example from stl_vector.h.

operator=(vector&& __x) // <-- Note double ampersands here
// NB: DR 675.
return *this;

Does "Address of Address" make any sense? Why does it have two address operators instead of just one? Thanks.


This is C++11 code. In C++11, the && token can be used to mean an "rvalue reference".