rvalue-reference
C++11 - Distinguishing rvalue pointers
How can I distinguish a variable as a compiler-constructed string? For example, while the rvalue \"Hello, World\" is of type const char*. const char* in itself does not mean that a pointer can\'t be[详细]
2023-02-17 08:24 分类:问答Is there a reference_wrapper<> for rvalue references?
I wonder how the following can be done void f(string &&s) { std::string i(move(s)); /* other stuff */[详细]
2023-02-13 19:03 分类:问答Can std::string overload "substr" for rvalue *this and steal resources?
It just occurred to me I noticed that std::string\'s substr operation could be much more efficient for rvalues when it could steal the allocated memory from *this.[详细]
2023-02-11 03:16 分类:问答Passing rvalues through std::bind
I wa开发者_JAVA技巧nt to pass an rvalue through std::bind to a function that takes an rvalue reference in C++0x.I can\'t figure out how to do it.For example:[详细]
2023-02-08 14:32 分类:问答Standard library containers producing a lot of copies on rvalues in GCC
I\'m writing a app for both linux & windows, and noticed that the GCC build is producing a lot of useless calls to the copy constructor.[详细]
2023-02-07 18:32 分类:问答Is it necessary to define move constructors from different classes?
Consider the following: struct X { Y y_; X(const Y & y) :y_(y) {} X(Y && y) :y_(std::move(y)) {}[详细]
2023-02-07 05:18 分类:问答Proper Implementation in the midst of no RValue implicit conversion
I ran into the problem that RValue does not allow implicit conversion. My questions is what implementation is better to \"bypass\" this limitation?[详细]
2023-02-07 02:35 分类:问答Rule-of-Three becomes Rule-of-Five with C++11? [closed]
Closed. This question is opinion-based. It is not currently accepting answers. 开发者_运维百科 Want to improve this question? Update the question so it can be answered with facts and citati[详细]
2023-02-06 04:53 分类:问答Use of rvalue reference members?
I was wondering what use an rvalue reference member has class A { // ... // Is this one useful? F开发者_如何学Coo &&f;[详细]
2023-02-06 01:33 分类:问答When will adding a move constructor and a move assignment operator really start make a difference?
Considering the high quality of today\'s compilers regarding return value optimization (both RVO and NRVO), I was wondering at what class complexity it\'s actually meaningful to start adding move cons[详细]
2023-02-05 20:31 分类:问答
加载中,请稍侯......