title: Redefinition as different kind of symbol using friend class C++14
body: <p>I am trying to write a template for a class. This class uses a Node class within it so I have defined the Node class as having the List class as a friend. See below. </p>
  
  <pre><code>template &lt;typename T&gt;
  class Node {
      private:
          Node() {
              next = nullptr;
              prev = nullptr;
          }
  
          Node(int data) : Node() { this-&gt;data = data; }
  
          Node *next;
          Node *prev;
          int data;
  
          friend class DoubleLinkedList;
      };
  
  template&lt;typename T&gt;
      class DoubleLinkedList {
  
      public:
          DoubleLinkedList();
  
          ~DoubleLinkedList();
  
      private:
          Node *_head;
          Node *_tail;
  
      };
  </code></pre>
  
  <p>I have another file where the classes are implemented. I get this error with or without the template definition above the List class. Can someone explain this?</p>