title: C++ compilation error enum "does not name a type"
body: <p>The following code:</p>
  
  <p>foo.h</p>
  
  <pre><code>#include "bar.h"
  class foo{ 
  public:
     enum my_enum_type { ONE, TWO, THREE }; 
     foo(); 
     ~foo() {} 
  };
  </code></pre>
  
  <p>foo.cpp</p>
  
  <pre><code>foo::foo()
  {
     int i = bar::MY_DEFINE;
  }
  </code></pre>
  
  <p>bar.h</p>
  
  <pre><code>#include "foo.h"
  class bar{
  public:
     static const int MY_DEFINE = 10;
     foo::my_enum_type var;
     bar() {};
     ~bar() {};
  };
  </code></pre>
  
  <p>Makes g++ compiler complain about my_enum_type "does not name a type".
  Why ?
  All headers have multiple inclusion defines (not shown here for clarity).</p>
  
  <p>Thanks</p>