C++

Asked • 09/22/19

What does T&& (double ampersand) mean in C++11?

I've been looking into some of the new features of C++11 and one I've noticed is the double ampersand in declaring variables, like `T&& var`. For a start, what is this beast called? I wish Google would allow us to search for punctuation like this. What exactly does it _mean?_ At first glance, it appears to be a double reference (like the C-style double pointers `T** var`), but I'm having a hard time thinking of a use case for that.

1 Expert Answer

By:

David A. answered • 10/11/19

Tutor
4.7 (14)

Experienced C++ tutor who loves to mentor and pass on my knowledge

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.