I think it depends on where you use them. I assume that what you are going to do is something like this:
template <class T>
class BinaryTreeNode
{
private:
shared_ptr<BinaryTreeNode<T> > left;
shared_ptr<BinaryTreeNode<T> > right;
T data;
}
, , . , , .
, , shared_ptr, shared_ptr , , node . , , - , , - auto_ptr. , - :
template <class T>
class BinaryTreeNode
{
private:
auto_ptr<BinaryTreeNode<T> > left;
auto_ptr<BinaryTreeNode<T> > right;
T data;
}
- , shared_ptr, - , , node . , , shared_ptr, node .