title: function implementation with enable_if outside of class definition
body: <p>So basically, I have a very basic generic class for now, currently testing the type_traits header. I am currently trying to make a function to work with certain types i.e arithmetic ones for now.</p>
  
  <pre><code>#include &lt;type_traits&gt;
  
  template &lt;typename T&gt; class Test {
      public:
          template &lt;typename U = T&gt; 
          typename std::enable_if&lt;std::is_arithmetic&lt;U&gt;::value&gt;::type print();
  }; 
  </code></pre>
  
  <p>The function works perfectly and for arithmetic types only.</p>
  
  <p>But I like to keep my classes tidy and only have them have prototypes, while the function implementations are outside of the class.</p>
  
  <p>With standard templates i.e </p>
  
  <pre><code>void test();
  
  template &lt;typename T&gt; void Test&lt;T&gt;::test() {}
  </code></pre>
  
  <p>It is simple and I know how to, but I have no clue how to declare the implementation outside of the class with "<code>std::enable_if</code>" and every attempt I have made, during compilation says that that the prototype does not match any in the class. </p>
  
  <p>I have managed to find a similar <a href="https://stackoverflow.com/questions/43694316/c11-enable-if-function-implementation-outside-of-class-definitio">question</a> here but the class there is standard and not generic.</p>
  
  <p>PS. I am using MinGW-w64 with -std=c++17</p>