This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/52103] need a finer control over -Woverloaded-virtual


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

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-02-03 10:13:55 UTC ---
You can use C++11 explicit override control:

struct B {
  virtual void f(int);
};

struct D : B {
  void f(long) override;     // error: doesn't override anything
  void f(int) override;      // ok
};

This is implemented in G++ 4.7.0


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]