title: User-defined conversion operator template and built-in operators: no match for operator
body: <p>Consider the following MCVE.</p>
  
  <pre><code>#include &lt;type_traits&gt;
  
  struct A {
      template&lt;typename T, typename std::enable_if&lt;std::is_same&lt;T,int&gt;::value,int&gt;::type = 0&gt;
      operator T() const { return static_cast&lt;T&gt;(1); }
  };
  
  int main() {
      int x = 1;
      A a;
      return x + a;
  }
  </code></pre>
  
  <p><strong>clang</strong> compiles it fine. <a href="https://godbolt.org/g/6V5Zc3" rel="noreferrer"><strong>DEMO</strong></a></p>
  
  <p>But <strong>GCC</strong> fails with:</p>
  
  <pre><code>error: no match for 'operator+' (operand types are 'int' and 'A')
    return x + a;
           ~~^~~
  </code></pre>
  
  <p><strong>Question:</strong> who is right and why?</p>