make use of override keyword if available

This commit is contained in:
Andrzej Rybczak
2012-09-04 19:19:37 +02:00
parent 6d87ebbc43
commit f6fb2ed54c
21 changed files with 298 additions and 292 deletions

View File

@@ -84,6 +84,18 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <functional>], [[int a = 5; std::fu
AC_MSG_ERROR([[Your compiler doesn't seem to support lambda functions, please upgrade (GCC >= 4.5)]])
)
dnl =========================================
dnl = checking for override keyword support =
dnl =========================================
AH_TEMPLATE([OVERRIDE], [override keyword used in C++11])
AC_MSG_CHECKING([whether compiler supports override keyword])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[struct A { virtual void foo() { } }; struct B : public A { virtual void foo() override { } };]], [])],
AC_MSG_RESULT([yes])
AC_DEFINE([OVERRIDE], [override]),
AC_MSG_RESULT([no])
AC_DEFINE([OVERRIDE], []),
)
dnl ==============================
dnl = checking for regex (win32) =
dnl ==============================