2170. [build] fdupont
Moved from C++ 11 to C++ 14 as the minimal C++ version
- which should be supported by the C++ compiler to
- build Kea.
+ which must be supported by the C++ compiler tobuild Kea.
(Gitlab #2876)
2169. [bug] marcin
)
usable_regex=
-AC_MSG_CHECKING(for usable C++14 regex)
+AC_MSG_CHECKING(for usable C++11 regex)
AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <regex>
#include <iostream>
# usable or not.
# Let's be optimistic and assume it is by testing only the negative case.
if test "x$usable_regex" != "xno" ; then
- AC_DEFINE(USE_REGEX, 1, [Define to 1 if C++14 regex is usable])
+ AC_DEFINE(USE_REGEX, 1, [Define to 1 if C++11 regex is usable])
fi
# Check for NETCONF support. If NETCONF was enabled in the build, and this check
AX_TLS
#
-# Some Googletest versions bug with C++14 compilers
+# Some Googletest versions bug with >= C++11 compilers
#
if test $enable_gtest != "no"; then
AC_MSG_CHECKING([if Google Test is compatible with the compiler])
CXX_SAVED=$CXX
feature=
-for retry in "none" "--std=c++14" "--std=c++0x" "--std=c++1x" "fail"; do
+for retry in "none" "--std=c++14" "--std=c++1y" "fail"; do
if test "$retry" = "fail"; then
AC_MSG_ERROR([$feature (a C++14 feature) is not supported])
fi
[AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])
continue])
+
+ AC_MSG_CHECKING(variable template support)
+ feature="variable template"
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [template<class T>
+ constexpr T pi = T(3.1415926535897932385L);],
+ [int a = pi<int>;],
+ )],
+ [AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no])
+ continue])
break
done