]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#2876] Addressed comments
authorFrancis Dupont <fdupont@isc.org>
Tue, 18 Jul 2023 16:29:12 +0000 (18:29 +0200)
committerFrancis Dupont <fdupont@isc.org>
Tue, 18 Jul 2023 22:46:18 +0000 (00:46 +0200)
ChangeLog
configure.ac
m4macros/ax_cpp14.m4

index 622eb446425278a7312754eeaaeb4337425b19d6..fc578c73015d06e26ef834817f2f40283fbd8058 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,6 @@
 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
index 49e7d55642391d40f9eb6bd9b5cc5e52d8c9a2af..73cb8acab40bd0d0c3928c854c751990bfed75cb 100644 (file)
@@ -614,7 +614,7 @@ AC_COMPILE_IFELSE(
 )
 
 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>
@@ -633,7 +633,7 @@ int main() {
 # 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
@@ -971,7 +971,7 @@ AC_CHECK_LIB(pthread, pthread_create,[ LDFLAGS="$LDFLAGS -lpthread" ], [])
 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])
index 7f39a74ca381157569031a4bb88ece88c9faad72..bc445829c20a0718ef1f36433efe92880538d6d4 100644 (file)
@@ -2,7 +2,7 @@ AC_DEFUN([AX_ISC_CPP14], [
 
 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
@@ -235,6 +235,18 @@ for retry in "none" "--std=c++14" "--std=c++0x" "--std=c++1x" "fail"; do
                 [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