Consider the following class:
template <typename Type>
class Wrapper
{
public:
Wrapper(const Type& x) : _data(x) {;}
Wrapper<Type>& operator=(const Type& x) {_data = x; return *this;}
protected:
Type _data;
};
What would be the definition of the move constructor Wrapper(Type&& x) and the move assignment operator operator=(Type&& x) of this class ?
1 Answer