title: I believe this is a bug in clang++ related to the access to a class's public member function
body: <p>The following <a href="http://coliru.stacked-crooked.com/a/99fdd4f58779d6e8" rel="nofollow noreferrer">doesn't compile</a> in clang:</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  void f() { std::cout &lt;&lt; "f()\n"; }
  
  struct S {
      typedef void(*p)();
      operator p() { return f; }
  };
  
  int main()
  {
      S s;
      s.operator p()();
  }
  </code></pre>
  
  <p>Yields:</p>
  
  <blockquote>
  <pre><code>main.cpp:13:16: error: unknown type name 'p'; did you mean 'S::p'?
      s.operator p()();
                 ^
                 S::p
  
  main.cpp:6:19: note: 'S::p' declared here
      typedef void(*p)();
                    ^
  </code></pre>
  </blockquote>
  
  <p>But it should, as the expression <code>s.operator p()()</code> accesses a public member function of the object <code>S::s</code>. Am I missing something?</p>
  
  <p>If I'm wrong, I would appreciate a quote from the Standard supporting the answer.</p>