title: Forward declaration of nested struct
body: <p>Consider this situation:</p>
  
  <pre><code>struct Foo
  {
      struct Bar
      {
      };
  };
  </code></pre>
  
  <p>How do I forward-declare <code>Foo::Bar</code>?</p>
  
  <hr>
  
  <p>What I tried:</p>
  
  <pre><code>struct Foo::Bar;
  </code></pre>
  
  <blockquote>
    <p>error: 'Foo' has not been declared</p>
  </blockquote>
  
  <pre><code>struct Foo;
  struct Foo::Bar;
  </code></pre>
  
  <blockquote>
    <p>error: 'Bar' in 'struct Foo' does not name a type</p>
  </blockquote>
  
  <pre><code>namespace Foo
  {
      struct Bar;
  }
  // ...
  struct Foo
  {
      struct Bar
      {
      };
  };
  </code></pre>
  
  <blockquote>
    <p>error: 'struct Foo' redeclared as different kind of symbol</p>
  </blockquote>
  
  <pre><code>struct Foo
  {
      struct Bar;
  };
  // ...
  struct Foo
  {
      struct Bar
      {
      };
  };
  </code></pre>
  
  <blockquote>
    <p>error: redefinition of 'struct Foo'</p>
  </blockquote>