diff options
author | andrew@webrtc.org <andrew@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> | 2013-12-10 19:20:46 +0000 |
---|---|---|
committer | andrew@webrtc.org <andrew@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> | 2013-12-10 19:20:46 +0000 |
commit | aa9e7685223a306a9808469ffeb20cd70bedb14c (patch) | |
tree | 59196f7c45b19ad481c8634e4734e9be27a6a71f /typedefs.h | |
parent | b589c654ec212fa3b571ef2405baf1955e700a87 (diff) | |
download | webrtc-aa9e7685223a306a9808469ffeb20cd70bedb14c.tar.gz |
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/webrtc@5253 4adac7df-926f-26a2-2b94-8c16560cd09d
Diffstat (limited to 'typedefs.h')
-rw-r--r-- | typedefs.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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 |