This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/52103] need a finer control over -Woverloaded-virtual
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 03 Feb 2012 10:13:55 +0000
- Subject: [Bug c++/52103] need a finer control over -Woverloaded-virtual
- Auto-submitted: auto-generated
- References: <bug-52103-4@http.gcc.gnu.org/bugzilla/>
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