title: What is the size limit for a class?
body: <p>I was wondering what the size limit for a class is. I did a simple test:</p>
  
  <pre><code>#define CLS(name,other) \
  class name\
  {\
  public: \
  name() {};\
     other a;\
     other b;\
     other c;\
     other d;\
     other e;\
     other f;\
     other g;\
     other h;\
     other i;\
     other j;\
     other k;\
  };
  
  class A{
     int k;
  public:
     A(){};
  };
  
  CLS(B,A);
  CLS(C,B);
  CLS(D,C);
  CLS(E,D);
  CLS(F,E);
  CLS(G,F);
  CLS(H,G);
  CLS(I,H);
  CLS(J,I);
  </code></pre>
  
  <p>It fails to compile with </p>
  
  <blockquote>
    <p>"'J' : class is too large"</p>
  </blockquote>
  
  <p>If I remove the final declaration - <code>CLS(J,I);</code>, it all compiles fine.</p>
  
  <p>Is this a compiler-imposed restriction, or is it somewhere in the standard?</p>