-2

Possible Duplicate:
Double Address Operator? (&&)

I came across the following function signature

void doSomething(double && r3);

It cannot be logical &&, and Reference is a single &... what is the above && ? If possible, can you point me to some documentation on it?

Community
  • 1
  • 1
Jimm
  • 8,165
  • 16
  • 69
  • 118

1 Answers1

1

It is an rvalue reference. I could tell you that I am an expert on the matter, but this is probably the most confusing aspect of C++ to me. Anyhow, here is a great explanation.

http://thbecker.net/articles/rvalue_references/section_03.html

Jonathan Henson
  • 8,076
  • 3
  • 28
  • 52
  • 2
    Here are two articles from Microsoft that helped me understand the difference between lvalue and rvalue. The second shows a good example of how rvalue could be used. http://msdn.microsoft.com/en-us/library/f90831hc.aspx http://msdn.microsoft.com/en-us/library/dd293668.aspx – HeatfanJohn Jul 25 '12 at 02:18