On Fri, May 06, 2016 at 12:40:45PM -0400, David Malcolm wrote:
> C++11 adds the ability to add "override" after an implementation of a
> virtual function in a subclass, to:
> (A) document that this is an override of a virtual function
> (B) allow the compiler to issue a warning if it isn't (e.g. a mismatch
> of the type signature).
> 
> Similarly, it allows us to add a "final" to indicate that no subclass
> may subsequently override the vfunc.
> 
> We use virtual functions in a few places (e.g. in the jit), so it would
> be good to get this extra checking.
> 
> This patch adds OVERRIDE and FINAL as macros to coretypes.h
> allowing us to get this extra checking when compiling with a compiler
> that implements C++11 or later (e.g. gcc 6 by default),
> but without requiring C++11.

Don't we also want CONSTEXPR similarly defined to constexpr for C++11 and
above and nothing otherwise?

        Jakub

Reply via email to