开发者

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

开发者 https://www.devze.com 2022-12-21 08:06 出处:网络
From Boost::Thread: template <typename R> class shared_future { ... // move support shared_future(shared_future && other);

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 do开发者_如何学JAVAuble-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.

0

精彩评论

暂无评论...
验证码 换一张
取 消