From 0b09a7ac6193a4db7b817e8cd4d830e7f1331bd4 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Sat, 1 Aug 2015 17:06:06 +0100 Subject: [PATCH] Add a conditional define for the override keyword. Use of the override keyword can prevent various types of problems when the base method signature is changed, but derived overriding methods are not. This is conditional to maintain compatibility with legacy compilers. --- src/stdafx.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/stdafx.h b/src/stdafx.h index d68605c196..13bc9685d2 100644 --- a/src/stdafx.h +++ b/src/stdafx.h @@ -514,4 +514,15 @@ static inline void free(const void *ptr) #define IGNORE_UNINITIALIZED_WARNING_STOP #endif +/* + * Conditional define for the override keyword. + * Use of the override keyword can prevent various types of problems when the base method signature is changed, but derived overriding methods are not + * This is conditional to maintain compatibility with legacy compilers + */ +#if __cplusplus >= 201103L || defined(__STDCXX_VERSION__) || defined(__GXX_EXPERIMENTAL_CXX0X__) || defined(__GXX_EXPERIMENTAL_CPP0X__) + #define OVERRIDE override +#else + #define OVERRIDE +#endif + #endif /* STDAFX_H */