简体   繁体   中英

Odd C++ member function declaration syntax: && qualifier

From Boost::Thread :

template <typename R>
class shared_future
{
...
// move support
shared_future(shared_future && other);
shared_future(unique_future<R> && other);
shared_future& operator=(shared_future && other);
shared_future& operator=(unique_future<R> && other);
...
}

What on earth are those double-ampersands ? I went over "BS The C++ Langauge 3d edition" and couldn't find any explanation.

This is a C++0x addition for rvalue references.

See http://www.artima.com/cppsource/rvalue.html .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM