Supported Compilers / C++11 Support in KF5
Michael Pyne
mpyne at kde.org
Mon Jul 22 19:37:33 BST 2013
On Mon, July 22, 2013 08:38:12 Johannes Sixt wrote:
> Am 7/21/2013 13:52, schrieb Rolf Eike Beer:
> > Explicit virtual overrides require g++ 4.7:
> >
> > http://gcc.gnu.org/projects/cxx0x.html
> >
> > This is trivially to work around by a CMake time check and then just
> > define
> > override to empty.
>
> Not so. 'override' is a legal identifier, not a pure keyword. By defining
> it away, you break existing code that uses the name for something else.
That's a great point (something I just came across in Stroustroup's 4th
Edition of TC++PL the other day).
'override' and 'final' are both what are described as "contextual keywords"
due to backward compatibility concerns.
This means it's not safe to use pre-processor macros to expand either of those
to be empty as they can be used in normal code sections (even though that's
probably a bad idea at this point).
Regards,
- Michael Pyne
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20130722/7229f4de/attachment.sig>
More information about the kde-core-devel
mailing list