summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-12-07 11:37:24 +0100
committerStephan Bergmann <sbergman@redhat.com>2018-12-07 22:46:49 +0100
commit7d928d8c6eb03c4e5e0d1961e9b62718ab53fb46 (patch)
tree43e827f3debcf3cfbc2c101c10ed2043bc880d9a /configure.ac
parent74dd206e67c2efb1e56d817be9e42a1ed82e3239 (diff)
HAVE_CXX14_CONSTEXPR is always true now
...but for safety, leave the configure.ac check in for some longer. o3tl::array_view::max_size (include/o3tl/array_view.hxx) and o3tl::basic_string_view::max_size (include/o3tl/string_view.hxx) started to produce loplugin:staticmethods warnings, which I silenced by /not/ making the functions static. Those classes are meant to be temporary drop-in replacements for standard classes (std::span slated for C++20, prev. std::array_view; and std::basic_string_view, resp.), so should have the same behavior as their standard counterparts (and making the functions static would likely cause loplugin:staticaccess warnings at call sites). Change-Id: If21674dbf02886f453ca447544e37b184df5a25e Reviewed-on: https://gerrit.libreoffice.org/64768 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac9
1 files changed, 3 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index 81e7d8aaaeb5..3d25986d1fae 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6347,7 +6347,8 @@ return !(i != 0 && j != 0);
AC_LANG_POP([C++])
CXXFLAGS=$save_CXXFLAGS
-AC_MSG_CHECKING([whether $CXX supports C++14 constexpr])
+dnl This check can eventually be removed completely (e.g., after libreoffice-6-3 branch off):
+AC_MSG_CHECKING([that $CXX supports C++14 constexpr])
save_CXXFLAGS=$CXXFLAGS
CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"
AC_LANG_PUSH([C++])
@@ -6375,13 +6376,9 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
}
};
constexpr auto v2 = S{10}.f();
- ]])], [cxx14_constexpr=yes], [cxx14_constexpr=no])
+ ]])], AC_MSG_RESULT([yes]), AC_MSG_ERROR([$CXX lacks required C++14 constexpr support]))
AC_LANG_POP([C++])
CXXFLAGS=$save_CXXFLAGS
-AC_MSG_RESULT([$cxx14_constexpr])
-if test "$cxx14_constexpr" = yes; then
- AC_DEFINE([HAVE_CXX14_CONSTEXPR])
-fi
dnl _Pragma support (may require C++11)
if test "$GCC" = "yes" -o "$COM_IS_CLANG" = TRUE; then