http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31397

--- Comment #13 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-06-21 
16:12:42 UTC ---
G++ 4.7 implements C++0x explicit override control so you can add 'override'

class B : public A
{
  B( int y );
  ~B();
  int f( int x ) override;
};

and you'll get an error if it doesn't actually override a virtual function from
a base class.

It's not *quite* what you want, but you could use it to check whether B::f
overrides a virtual (and so you want to add 'virtual' to it) without checking
the declaration of A::f

Reply via email to