title: Why can't the type be deduced in this template function?
body: <pre><code>template&lt;typename T&gt;
  std::istream &amp; read(std::istream &amp; istr, typename std::enable_if&lt;std::is_pod&lt;T&gt;::value, T&gt;::type &amp; value)
  {
      return istr.read( reinterpret_cast&lt;char*&gt;(&amp;value), sizeof(T));
  }
  
  int main() 
  {
      int x;
      read(cin, x); // error here
  }
  
  
  error C2783: 'std::istream &amp;read(std::istream &amp;,std::enable_if&lt;std::tr1::is_pod&lt;_Ty&gt;::value,T&gt;::type &amp;)' : could not deduce template argument for 'T'
  </code></pre>
  
  <p>It works if I specify read&lt;int&gt;.  Is there any way to get it to deduce the type from the argument?</p>