title: Not able to befriend typedefs: any particular reason?
body: <pre><code>struct A {};
  typedef A B;
  
  struct C { friend struct B; };
  </code></pre>
  
  <p>GCC 4.7.0 20110427 tells me <code>error: using typedef-name 'B' after 'struct'</code>.</p>
  
  <p>So far, this seems pretty self-explanatory; after all, my example code is trying to declare-and-friend a <code>struct</code> called B, which is in fact not a <code>struct-key</code>.</p>
  
  <p>However, I have to write <code>friend struct A;</code> if <code>A</code> is in fact a complex, long-winded mess of template metahackery, this is not desirable.</p>
  
  <p>Am I missing something, or can we in fact <em>not</em> <code>friend</code> types through type aliases? If not, is there any particular reason or is it just a quirk of the language?</p>
  
  <hr>
  
  <p><a href="https://stackoverflow.com/questions/392120/why-cant-i-declare-a-friend-through-a-typedef">This question</a> brought up the issue before, but is dated and makes assertions on the matter regarding C++0x that don't appear to be true. <em>This question instead regards the C++0x FDIS.</em></p>