Nice question. In the initializer of a static member variable, class is in scope, so the "i" in int A::i = i; is the class member, not the global variable. It's just like in the body of a member function, "i" would refer to the class member even if the function is defined out of line.