In C++11 if you manually define either a copy constructor or an
assignment operator, you must define the other as well.
struct Node
{
+protected:
+ Node() { }
+ Node(const Node &) { }
private:
Node &operator=(const Node &);
public:
NodePtr() { }
NodePtr(T *p): RefPtr<T>(p) { }
NodePtr(const NodePtr &p): RefPtr<T>(p ? p->clone() : 0) { }
+ NodePtr &operator=(const NodePtr &p) { RefPtr<T>::operator=(p); return *this; }
template<typename U>
NodePtr(const RefPtr<U> &p): RefPtr<T>(p) { }