title: C++ ostream implicitly deleted with template
body: <p>I have a templated class that I am trying to print out using operator &lt;&lt; but get the errors:</p>
  
  <pre><code>Vertex.h:24:16: error: use of deleted function 'std::basic_ostream&lt;char&gt;::basic_ostream(const std::basic_ostream&lt;char&gt;&amp;)'
  </code></pre>
  
  <p>where line 24 refers to the return of the output operator in the following code:</p>
  
  <pre><code>/In declaration of templated class Vertex
  friend std::ostream operator&lt;&lt;(std::ostream&amp; ost, const Vertex&lt;T&gt;&amp; v) {
      ost &lt;&lt; v.getItem();
      return ost;
  }
  
  //In main function
  Vertex&lt;int&gt;* v1 = new Vertex&lt;int&gt;();
  v1-&gt;setItem(15);
  cout &lt;&lt; *v1 &lt;&lt; endl;
  </code></pre>
  
  <p>How can I get this output working?</p>