Remove configure test for override keyword.

Detect its support in the code by testing __cplusplus value and using specific
checks for MSVC and Clang as configure detects it as being available when
using recent g++ versions in non-C++11 mode, which do support this keyword but
warn when it is used without -std={gnu,c}++11 option, which makes actually
using it a bad idea in this case.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76174 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2014-03-20 15:49:07 +00:00
parent 33ad33d447
commit 78de4fe291
5 changed files with 9 additions and 106 deletions

View File

@@ -269,21 +269,21 @@ typedef short int WXTYPE;
#define wxEXPLICIT
#endif /* HAVE_EXPLICIT/!HAVE_EXPLICIT */
/* check for override keyword support */
/* check for override keyword support */
#ifndef HAVE_OVERRIDE
#if defined(__VISUALC__) && (__VISUALC__ >= 1400)
/*
VC++ 8.0+ support C++/CLI's override, sealed, and abstract in native
code as a nonstandard extension, and C++/CLI's override fortunately
matches C++11's
*/
#if __cplusplus >= 201103L
/* All C++11 compilers should have it. */
#define HAVE_OVERRIDE
#elif wxCHECK_GCC_VERSION(4, 7) && __cplusplus >= 201103L
#elif wxCHECK_VISUALC_VERSION(8)
/*
VC++ 8.0+ do support override keyword but don't define __cplusplus
as indicating C++11 support, so handle this case specially.
*/
#define HAVE_OVERRIDE
#elif WX_HAS_CLANG_FEATURE(cxx_override_control)
#define HAVE_OVERRIDE
#endif
#endif /* !HAVE_OVERRIDE */
#endif /* !HAVE_OVERRIDE */
#ifdef HAVE_OVERRIDE
#define wxOVERRIDE override