title: No matching constructor for initialization of constructor of templated class
body: <p>I'm trying to create a template based tree where the nodes are specialized such that the methods accessing the element of the node and the child nodes return the child node type.  Below is the abridged version of the code.</p>
  
  <pre><code>template&lt;class NodeObjectType, class ChildNodeObjectType, class ChildNode&gt;
  class Node {
  public:
      Node(Node* parent, NodeObjectType* object);
      ChildNode* addAsChild(ChildNodeObjectType* object);
  private:
      NodeObjectType* nodeObject;
      std::vector&lt;ChildNode*&gt; children;
  };
  
  typedef Node&lt;B, void, void&gt; BNode;
  typedef Node&lt;A, B, BNode&gt; ANode;
  typedef Node&lt;void, A, ANode&gt; RootNode;
  
  /* constructor */
  
  template&lt;class NodeObjectType, class ChildNodeObjectType, class ChildNode&gt;
  ChildNode* Node&lt;NodeObjectType, ChildNodeObjectType, ChildNode&gt;::
    addAsChild(ChildNodeObjectType* object)
  {
      ChildNode* child = new ChildNode(this, object);
      children.push_back(child);
      return child;
  }
  </code></pre>
  
  <p>The error is in the new ChildNode() call in addAsChild.  Am I trying to do something that can't be done, or have I just made some mistake somewhere?</p>