title: No cast although cast operator is defined
body: <p>Can someone please help me to understand why the following code does not compile:</p>
  
  <pre><code>template&lt; typename T &gt;
  class A
  {};
  
  template&lt; typename U &gt;
  class wrapper
  {
    public:
      // cast operator
      operator wrapper&lt; A&lt;void&gt; &gt; ()
      {
        return wrapper&lt; A&lt;void&gt; &gt;{};
      }
  
  };
  
  template&lt; typename T &gt;
  void foo( wrapper&lt; A&lt;T&gt; &gt; )
  {}
  
  
  int main()
  {
    foo(  wrapper&lt;void&gt;{} );
  }
  </code></pre>
  
  <p>error message:</p>
  
  <pre><code>t.cpp:24:7: error: no matching function for call to 'foo'
        foo(  wrapper&lt;void&gt;{} );
        ^~~
  t.cpp:18:10: note: candidate template ignored: could not match 'A&lt;type-parameter-0-0&gt;' against 'void'
      void foo( wrapper&lt; A&lt;T&gt; &gt; )
           ^
  1 error generated.
  </code></pre>
  
  <p>and how to fix it?</p>
  
  <p>I expected that <code>wrapper&lt;void&gt;</code> is casted to <code>wrapper&lt; A&lt;void &gt;</code> using the cast operator of <code>class wrapper</code>.</p>