rvalue-reference
rvalue references in Visual Studio 2010
What are the differences between rvalue references as implemented in Visual Studio 2010 and as specified in the C++11? A开发者_如何学Gore there any particular pitfalls to watch out for when using reva[详细]
2023-03-29 09:30 分类:问答Template type deduction problem
I\'ve got a variant class. It has a pair of constructors: /// Construct and fill. template <typename T>[详细]
2023-03-26 11:27 分类:问答Are moved-from objects required to be destructed?
If I move-construct a from b, is it still necessary to destruct b, or can I get away without doing so?[详细]
2023-03-25 17:52 分类:问答Tuple of RValue reference
The following piece of code #include <iostream> #include <vector> #include <tuple> using namespace std;[详细]
2023-03-24 21:18 分类:问答Rvalue ref and perfect forwarding
I\'ve read few papers about && and I\'m just curious if having: void fnc_1(int&& p) { //...[详细]
2023-03-23 19:59 分类:问答Does it make sense to use the move-and-swap idiom on a movable and non-copyable class
If I have a class such as class Foo{ public: Foo(){...} Foo(Foo && rhs){...} operator=(Foo rhs){ swap(*this, rhs);}[详细]
2023-03-22 17:06 分类:问答Why do some people use swap for move assignments?
For example, stdlibc++ has the following: unique_lock& operator=(unique_lock&& __u) { if(_M_owns)[详细]
2023-03-20 08:20 分类:问答The structure of std::forward [duplicate]
This question already has an answer her开发者_如何学运维e: Closed 11 years ago. Possible Duplicate:[详细]
2023-03-18 06:38 分类:问答Conditional compilation for move operations
How can I check whether my compiler supports rvalue references or not? Is there a standard preprocessor macro, or do different compilers have different macros? Ideally, I would want to write this:[详细]
2023-03-15 12:08 分类:问答rvalue function overloading
I want to overload a function so that it manipulates its argument in some way and then returns a reference to the argument – but if the argument is not mutable, then it should return a manipulated co[详细]
2023-03-13 13:52 分类:问答
加载中,请稍侯......