summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAdam <adam@sigterm.info>2013-05-16 08:47:07 -0700
committerAdam <adam@sigterm.info>2013-05-16 08:47:07 -0700
commitf79e9a3e8019be35edd95cd4455910212f872ce9 (patch)
tree2cb416d8118cdff50d6bc9e77923bbde31d6338d /include
parent55fea4a01053fcb57423cb57fbce2785bf0b47fa (diff)
parent8e9abaaa7303f2f85b6a840bc80506313aee6b4f (diff)
Merge pull request #538 from SaberUK/master+silence-gcc
Fix GCC warnings about using C++11 features when not in C++11 mode.
Diffstat (limited to 'include')
-rw-r--r--include/compat.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/compat.h b/include/compat.h
index d3d554b18..299b32a88 100644
--- a/include/compat.h
+++ b/include/compat.h
@@ -49,12 +49,16 @@
* These macros enable the use of the C++11 override control keywords in
* compilers which support them.
*/
-#if defined __clang__
+#if __cplusplus >= 201103L
+# define HAS_CXX11_FINAL_OVERRIDE
+#elif defined __clang__
# if __has_feature(cxx_override_control)
# define HAS_CXX11_FINAL_OVERRIDE
# endif
#elif (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)
-# define HAS_CXX11_FINAL_OVERRIDE
+# if defined __GXX_EXPERIMENTAL_CXX0X__
+# define HAS_CXX11_FINAL_OVERRIDE
+# endif
#elif _MSC_VER >= 1700
# define HAS_CXX11_FINAL_OVERRIDE
#endif