title: Add method to class by template parameter
body: <p>I would like to have a template parameter specific function inside a class unsing enable_if. Its name stays the same, the parameter type varies (although this should not be relevant since only one is initialized).</p>
  
  <pre><code>enum class MyCases {
      CASE1,
      CASE2
  };
  
  template&lt;enum MyCases case&gt;
  class MyClass
  {
      template&lt;typename = typename std::enable_if&lt;case == MyCases::CASE1&gt;::type&gt;
      void myFunction(ParameterTypeA a) {
          ...
      }
  
      template&lt;typename = typename std::enable_if&lt;case == MyCases::CASE2&gt;::type&gt;
      void myFunction(ParameterTypeB b) {
          ...
      }
  };
  </code></pre>
  
  <p>I get now an error saying that the compiler wanted to instantiate the first function with CASE2 and the second function with CASE1, although I thought that the substitution failure should not cause an error (SFINAE). What am I doing wrong? Thank you for any help!</p>
  
  <pre><code>error: no type named ‘type’ in ‘struct std::enable_if&lt;false, void&gt;’
  </code></pre>