Index: base/compiler_specific.h |
diff --git a/base/compiler_specific.h b/base/compiler_specific.h |
index 409a613964cef2cf74c36ade8b040e5e63656757..dc4b23349873c8ae81e0312badd109bf2416f222 100644 |
--- a/base/compiler_specific.h |
+++ b/base/compiler_specific.h |
@@ -141,6 +141,10 @@ |
#define OVERRIDE override |
#elif defined(__clang__) |
#define OVERRIDE override |
+#elif defined(COMPILER_GCC) && __cplusplus >= 201103 && \ |
+ (__GNUC__ * 10000 + __GNUC_MINOR__ * 100) >= 40700 |
+// GCC 4.7 supports explicit virtual overrides when C++11 support is enabled. |
+#define OVERRIDE override |
#else |
#define OVERRIDE |
#endif |
@@ -155,6 +159,10 @@ |
#define FINAL sealed |
#elif defined(__clang__) |
#define FINAL final |
+#elif defined(COMPILER_GCC) && __cplusplus >= 201103 && \ |
+ (__GNUC__ * 10000 + __GNUC_MINOR__ * 100) >= 40700 |
+// GCC 4.7 supports explicit virtual overrides when C++11 support is enabled. |
+#define FINAL final |
#else |
#define FINAL |
#endif |