title: error: void value not ignored as it ought to be
body: <pre><code>template &lt;typename Z&gt; Z myTemplate &lt;Z&gt; :: popFromVector ()
  {
      if (myVector.empty () == false)
          return myVector.pop_back ();
  
      return 0;
  }
  
  int main ()
  {
      myTemplate &lt;int&gt; obj;
  
      std :: cout &lt;&lt; obj.popFromVector();
  
      return 0;
  }
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>error: void value not ignored as it ought to be
  </code></pre>
  
  <p>AFAI can see, the return type of <code>popFromVector</code> is NOT void. What's the point that I am missing?
  The error disappears when I comment out this call in main().</p>