title: Which function is used to initialize the static class member?
body: <p>I have a question about which function is chosen to init a static class member. </p>
  
  <pre><code>//Base.h
  
  class Base
  {
  private:
      static int count;
      static int countInit()
      {
          return 10;
      }
  public:
      Base()
      {
      }
  };
  
  //and Base.cpp
  static int countInit()
  {
      return 0;
  }
  int Base::count=countInit();//member function is used.
  static int local_count=countInit();//the local one in Base.cpp
  </code></pre>
  
  <p>The variable <code>Base::count</code> is initialized with <code>Base::countInit()</code> rather than the <code>countInit()</code> defined in Base.cpp. But the <code>local_count</code> is initialized by the local <code>countInit</code>. So, I wonder, is there a rule like <strong>Koenig lookup</strong> within this case?</p>