title: std::enable_if with std::is_same refuses to compile
body: <p>The following code fails to compile</p>
  
  <pre><code>#include &lt;type_traits&gt;
  #include &lt;fftw3.h&gt;
  
  template&lt;class Real&gt;
  class foo
  {
  public:
      foo(Real* x, size_t length,
          typename std::enable_if&lt;std::is_same&lt;double, Real&gt;::value&gt;::type* = nullptr)
      {
          y = fftw_alloc_real(length);
          fftw_plan plan = fftw_plan_r2r_1d(length, x, y, FFTW_REDFT10, FFTW_ESTIMATE);
          fftw_execute_r2r(plan, x, y);
          fftw_destroy_plan(plan);
      }
  
      foo(Real* x, size_t length,
          typename std::enable_if&lt;std::is_same&lt;float, Real&gt;::value&gt;::type* = nullptr)
      {
          y = fftwf_alloc_real(length);
          fftwf_plan plan = fftwf_plan_r2r_1d(length, x, y, FFTW_REDFT10, FFTW_ESTIMATE);
          fftwf_execute_r2r(plan, x, y);
          fftwf_destroy_plan(plan); 
      }
  
  
  private:
      Real* y;
  };
  
  int main()
  {
      std::vector&lt;double&gt; x{12, 83, 96.3};
      foo&lt;double&gt; fd(x.data(), x.length());
  
      std::vector&lt;float&gt; xf{12, 82, 96.2};
      foo&lt;float&gt; ff(x.data(), x.length());
  }
  </code></pre>
  
  <p>giving error message</p>
  
  <pre><code>test.cpp:14:33: error: no type named 'type' in 'std::__1::enable_if&lt;false, void&gt;'; 'enable_if' cannot be used to disable this declaration
      typename std::enable_if&lt;std::is_same&lt;float, Real&gt;::value&gt;::type* = nullptr)
  </code></pre>
  
  <p>What is wrong with my syntax or understanding of <code>std::enable_if</code> that makes this not compile? What is the fix so that I can use a template which still calls non-templated code from FFTW?</p>