title: About C++ classes with self reference
body: <p>I am a little bit confused ...</p>
  
  <p>Why is this allowed in C++:</p>
  
  <pre><code>static int t = 0;
  
  class A
  {
      public:
          A() : m(t++)
          {
  
              cout &lt;&lt; "C:" &lt;&lt; m &lt;&lt; endl; 
              if(t &gt;= 5)
              {
                  A a;                      // &lt;&lt;&lt;&lt; ----- THIS line
                  throw( a);
              }
          }            
  
          int m;
  };
  </code></pre>
  
  <p>But this not:</p>
  
  <pre><code>static int t = 0;
  
  class A
  {
      public:
  
          A() : m(t++)
          {
  
              cout &lt;&lt; "C:" &lt;&lt; m &lt;&lt; endl; 
          }
  
          A a;                            // &lt;&lt;&lt;&lt; ----- THIS line
  
          int m;
  };
  </code></pre>
  
  <p>The second one is not compiling as expected (yes, I know why it's not compiling: at that point in code the <code>A</code> is still incomplete) ... </p>
  
  <p>But ... the first one compiles nicely (and does what it's supposed to do, ie: crashes the application on a statement like: <code>A a[10];</code> ). Is the <code>A</code> a complete type in the constructor? Can also point me some C++ standard entries for this situation?</p>