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++/17920] add __attribute__((reimpl)) as a replacement for the (optional) virtual keyword for reimplementations of virtual functions


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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.7.0

--- Comment #14 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-06-21 16:00:11 UTC ---
G++ 4.7 supports C++0x explicit override control, so the example can be changed
to:

struct A { virtual void foo() const; };
struct B : public A { void foo() override; };

And you get:

final.cc:2:28: error: 'void B::foo()' marked override, but does not override


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