On 2012-12-02 22:03, Michael Stahl wrote:
... what i'd really like to have though is a C++ keyword plus "error if there is not actually a base class method with that parameter signature"

Here we go,
http://stackoverflow.com/questions/497630/safely-override-c-virtual-functions
there is a new C++ 11 keyword, "override",

Which it looks like CLANG supports as of version 3.1, GCC supports it as 4.7, and Visual Studio as of version 11.
http://cpprocks.com/a-comparison-of-c11-language-support-in-vs2012-g-4-7-and-clang-3-1/

CLANG even has a tool to automatically add the keyword to existing source code.
http://clang-developers.42468.n3.nabble.com/add-override-specifier-example-tool-td4025070.html


So perhaps we should define a new macro "SAL_OVERRIDE", which expands to the correct keyword on new enough versions of those compilers?

Regards, Noel Grandin



Disclaimer: http://www.peralex.com/disclaimer.html


_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to