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
Context
- Re: [API] Some more cleanup ideas (continued)
Re: [API] Some more cleanup ideas · Lubos Lunak
Re: [API] Some more cleanup ideas · Stephan Bergmann
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.