title: why a const object of an empty class cant be created
body: <pre><code>#include &lt;iostream&gt;
  
  class A {
     public:
        void foo() const {
            std::cout &lt;&lt; "const version of foo" &lt;&lt; std::endl;
        }
        void foo() {
            std::cout &lt;&lt; "none const version of foo" &lt;&lt; std::endl;
        }
  };
  
  int main()
  {
    A a;
    const A ac;
    a.foo();
    ac.foo();
  }
  </code></pre>
  
  <p>The above code can't be compiled, could anyone of you tell me why?</p>