title: Is there a way to prevent a method from being overridden in subclasses?
body: <p>Is anyone aware of a language feature or technique in C++ to prevent a child class from over riding a particular method in the parent class?</p>
  
  <pre><code>class Base {
  public:
      bool someGuaranteedResult() { return true; }
  };
  
  class Child : public Base {
  public:
      bool someGuaranteedResult() { return false; /* Haha I broke things! */ }
  };
  </code></pre>
  
  <p>Even though it's not virtual, this is still allowed (at least in the Metrowerks compiler I'm using), all you get is a compile time warning about hiding non-virtual inherited function X.</p>