In C++11, you should add rvalue reference:
A(A&&);
void operator=(A&& a );
More Related Contents:
- Does C++ pass objects by value or reference?
- Performance cost of passing by value vs. by reference or by pointer?
- How to pass objects to functions in C++?
- Is it better in C++ to pass by value or pass by constant reference?
- Pass by Reference / Value in C++
- Where should I prefer pass-by-reference or pass-by-value?
- Is it better in C++ to pass by value or pass by reference-to-const?
- Function Overloading Based on Value vs. Const Reference
- C++ – passing references to std::shared_ptr or boost::shared_ptr
- What exactly is the difference between “pass by reference” in C and in C++?
- pass by reference and value with pointers [duplicate]
- Pass by reference and value in C++
- C++: Why pass-by-value is generally more efficient than pass-by-reference for built-in (i.e., C-like) types
- C++ view types: pass by const& or by value?
- std::endl is of unknown type when overloading operator
- Default value to a parameter while passing by reference in C++
- Why override operator()?
- Pass an array to a function by value
- How to code a modulo (%) operator in C/C++/Obj-C that handles negative numbers
- Why can’t you overload the ‘.’ operator in C++?
- What legitimate reasons exist to overload the unary operator&?
- Calling a const function rather than its non-const version
- Is there actually a reason why overloaded && and || don’t short circuit?
- C++ overloading array operator
- ‘friend’ functions and
- Can’t Overload operator
- How do I call the original “operator new” if I have overloaded it?
- How is its lifetime of a return value extended to the scope of the calling function when it is bound to a const reference in the calling function?
- How to overload operator==() for a pointer to the class?
- STL containers with reference to objects [duplicate]