Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


On 11/27/2011 08:58 PM, Noel Grandin wrote:
I see the Mozilla project is adding MOZ_FINAL and MOZ_OVERRIDE macros
to help control method overriding in their codebase

http://whereswalden.com/2011/11/16/introducing-moz_override-to-annotate-virtual-functions-which-override-base-class-virtual-functions/
http://whereswalden.com/2011/11/26/introducing-moz_final-prevent-inheriting-from-a-class-or-prevent-overriding-a-virtual-function/

Would such things be useful additions to the LibreOffice codebase?

In principle, yes. Like happened with features of the old C++ Standard that only made it slowly into the various compilers (the infamous VOS_NAMESPACE etc. stuff, e.g.), we will likely need macros for new features that can be enabled for compilers that already understand them, without breaking the code for legacy compilers.

However, given that override and final will only make it into GCC 4.7 (according to <http://wiki.apache.org/stdcxx/C++0xCompilerSupport>), it might still be a bit early to address them.

Stephan

Context


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.