confusion about constructor

Here is a piece of code I found in a book:
1
2
3
4
5
6
7
8
9
10
11
12
template <class Comparable>
class BinarySearchTree 
{
  public:
  explicit BinarySearchTree ( cont Comparable & notFound);
  BinarySearchTree (const BinarySearchTree & rhs);
  BinarySearchTree <Comparable> (){root = NULL;}
  bool isEmpty() const { return root==NULL; }

  private:
  Node<Comparable> *root;
}

My question is why in the explicit constructor the argument is :
cont Comparable & notFound. I thought the argument should be type Node<Comparable> *root, since that is the private member. Thanks
"notFound" vs. "root" is just a placeholder name...doesn't mean anything.

Evidently, the constructor is passing the Comparable object by reference, rather than by address. If I remember correctly, this creates a copy of the object for the parameter.
But shouldn't the constructor argument be of type Node * and not Comparable &? The private member is of type Node not Comparable. Node itself is a class.
Can't say for sure without knowing what the constructor is doing, or for that matter, how the class is supposed to behave in general. But, it seems to be a valid copy constructor definition.
Topic archived. No new replies allowed.