Remove compatibility support for sealed/override in C++/CLI
Those features have slightly different behavior as the C++11 keywords that MSVC 2012 officially supports. When compiling in C++/CLI mode, the "virtual" keyword must be present too. We have not actually tested whether the official MSVC 2012 support for C++/CLI still requires the virtual keyword. This is just going on the assumption that C++/CLI follows the C++11 spec. Task-number: QTBUG-34019 Change-Id: I148a443bfbff985033c555f5a9cfcd5be7f5f106 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
This commit is contained in:
parent
74f2a1bd47
commit
704616605b
@ -696,15 +696,20 @@
|
|||||||
# if _MSC_VER >= 1400
|
# if _MSC_VER >= 1400
|
||||||
/* C++11 features supported in VC8 = VC2005: */
|
/* C++11 features supported in VC8 = VC2005: */
|
||||||
# define Q_COMPILER_VARIADIC_MACROS
|
# define Q_COMPILER_VARIADIC_MACROS
|
||||||
|
|
||||||
|
# ifndef __cplusplus_cli
|
||||||
/* 2005 supports the override and final contextual keywords, in
|
/* 2005 supports the override and final contextual keywords, in
|
||||||
the same positions as the C++11 variants, but 'final' is
|
the same positions as the C++11 variants, but 'final' is
|
||||||
called 'sealed' instead:
|
called 'sealed' instead:
|
||||||
http://msdn.microsoft.com/en-us/library/0w2w91tf%28v=vs.80%29.aspx
|
http://msdn.microsoft.com/en-us/library/0w2w91tf%28v=vs.80%29.aspx
|
||||||
|
The behavior is slightly different in C++/CLI, which requires the
|
||||||
|
"virtual" keyword to be present too, so don't define for that.
|
||||||
So don't define Q_COMPILER_EXPLICIT_OVERRIDES (since it's not
|
So don't define Q_COMPILER_EXPLICIT_OVERRIDES (since it's not
|
||||||
the same as the C++11 version), but define the Q_DECL_* flags
|
the same as the C++11 version), but define the Q_DECL_* flags
|
||||||
accordingly: */
|
accordingly: */
|
||||||
# define Q_DECL_OVERRIDE override
|
# define Q_DECL_OVERRIDE override
|
||||||
# define Q_DECL_FINAL sealed
|
# define Q_DECL_FINAL sealed
|
||||||
|
# endif
|
||||||
# endif
|
# endif
|
||||||
# if _MSC_VER >= 1600
|
# if _MSC_VER >= 1600
|
||||||
/* C++11 features supported in VC10 = VC2010: */
|
/* C++11 features supported in VC10 = VC2010: */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user