Correctly define OVERRIDE when building with g++ 4.7 and C++11 support
g++ 4.7 and later support explicit virtual overrides when building with C++11 support enabled. However, webrtc does not detect that and makes OVERRIDE a no-op. This CL updates typedefs.h to define OVERRIDE properly when g++ 4.7 is used with C++11 support enabled. See this page for GCC support of C++11 features: http://gcc.gnu.org/projects/cxx0x.html R=andrew@webrtc.org, fischman@webrtc.org Review URL: https://webrtc-codereview.appspot.com/5149005 Patch from Chris Dumez <ch.dumez@samsung.com>. git-svn-id: http://webrtc.googlecode.com/svn/trunk@5253 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
8b8819262f
commit
762fcdcca9
@ -88,6 +88,10 @@ typedef unsigned __int64 uint64_t;
|
||||
// (because it won't see this pragma).
|
||||
#pragma clang diagnostic ignored "-Wc++11-extensions"
|
||||
#define OVERRIDE override
|
||||
#elif defined(__GNUC__) && __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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user