title: Why can a destructor change the state of a constant object?
body: <p>I know that it is not allowed to modify the state of a constant object but why can the  destructor change this state?</p>
  
  <pre><code>class A
  {
  public:
      ~A()
      {
          i = 2; //?
      }
  
      void test() const
      {
          //i = 1; //Not allowed
      }
  
      int i = 0;
  };
  
  int main()
  {
      const A o;
      o.test();
  }
  </code></pre>