CRTP idiom is used to solve such problems. Basically, you get a template that receives the derived class as a template parameter, so you can use the type in the return values, etc.
In your case, you need to create a common base template for two tree types and implement Find there, when implementing Find2 in derived classes:
template <class T> class BaseTree { public: bool Find() { typename T::NodeType* NodePtr = static_cast<T*>(this)->Find2(...); } } template <class T> class BinaryTree<T> : public BaseTree<BinaryTree<T>> { public: typedef Node<T> NodeType; NodeType Find2();
This basically implements "static polymorphism." The advantage of regular polymorphism is that you can use return types as you would like.
Edit: Added a more detailed description to better match the OP.
ltjax source share