title: Using static class members of the class being defined
body: <p>Using static class members in a class is a common practice. consider the following definition:</p>
  
  <p>foo.h</p>
  
  <pre><code>   class foo
     {
     public:
         virtual ~foo();
     protected:
         foo();
         static foo ms_oFooStaticObject;
     }
  </code></pre>
  
  <p>foo.cpp</p>
  
  <pre><code>   foo foo::ms_oFooStaticObject;
     foo::foo(){}
     foo::~foo(){}
     void main()
     {
         int i;
     }
  </code></pre>
  
  <p>while compiling the above code there is no compiler error, and you can simply run in step mode and observe the static c-tor being executed.</p>
  
  <p>how can this be? is this a compiler bug?</p>
  
  <p>I am using visual studio 2005 (Professional Edition) with SP1 (SP.050727-7600)</p>