Is there a way to pass the class itself as a default value.
template<typename T, class NodeType>
class A: {
public:
virtual NodeType* foo() {}
};
template<typename T, class NodeType=B<T>>
class B: public A<T, NodeType> {
};
I am making a general node for trees.
BinaryTreeNode -> BSTNode -> AVLNode
Aucun commentaire:
Enregistrer un commentaire