What is the purpose of using a reference to a reference in C++?
- by SilverSun
In my adventures studying the boost libraries, I've come across function signatures that have parameters which are a reference to a reference to an object.
Example:
void function(int && i);
What is the purpose/benefit of doing it this way rather than simply taking a reference to an object? I assume there is one if it's in boost.