title: Is it possible to use std::enable_if to select a member template specialization?
body: <p>Given a class declaration</p>
  
  <pre><code>class A {
      template &lt;typename T&gt; T foo();
  };
  </code></pre>
  
  <p>I would like to specialize <code>A::foo</code> for various types (<code>int</code>, ...) and type classes (POD, non-POD) of <code>T</code>. Unfortunately, I cannot seem to use <code>std::enable_if</code> for the latter. The following doesn't compile:</p>
  
  <pre><code>template &lt;&gt; int A::foo&lt;int&gt;(); // OK
  
  template &lt;typename T&gt; 
  typename std::enable_if&lt;is_pod&lt;T&gt;::value, T&gt;::type foo(); // &lt;&lt;&lt;&lt; NOT OK!
  
  template &lt;typename T&gt; 
  typename std::enable_if&lt;!is_pod&lt;T&gt;::value, T&gt;::type foo(); // &lt;&lt;&lt;&lt; NOT OK!
  </code></pre>
  
  <p>The issue is probably due to the <code>std::enable_if&lt;...&gt;</code> stuff being part of the function signature, and that I did not declare any such member inside <code>A</code>. So how can I specialize a template member based on type traits?</p>