[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 2814dec 11/28: Check for comparison operator
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 2814dec 11/28: Check for comparison operator defaulting in configure C++ test |
Date: |
Wed, 12 May 2021 18:14:43 -0400 (EDT) |
branch: master
commit 2814dec061912eda3c68dc3b28bfd629635c50db
Author: Vadim Zeitlin <vadim@tt-solutions.com>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Check for comparison operator defaulting in configure C++ test
Verify that defaulting operator<=>() really works, as this is required
by lmi now.
---
configure.ac | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index cf2844d..1788619 100644
--- a/configure.ac
+++ b/configure.ac
@@ -139,7 +139,12 @@ m4_define([lmi_cxx_feature_test], [[
#elif __cplusplus <= 201402L
#error At least C++17 is required.
#else
-struct S { int x = 0; double y = 0.0; };
+#include <compare>
+struct S {
+ int x = 0;
+ double y = 0.0;
+ auto operator<=>(S const&) const = default;
+};
S s = {.x = 1, .y = 2.0};
static_assert(true);
#endif
@@ -163,6 +168,14 @@ if test "$lmi_cv_cxx_features" = "no"; then
AC_MSG_ERROR([Can't enable C++20 support required for building
lmi.])
)]
)
+
+ dnl Final sanity check: our test code must compile in C++20.
+ AC_LANG_PUSH([C++])
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([lmi_cxx_feature_test])],
+ [],
+ [AC_MSG_ERROR([Compiler ($CXX $CXXFLAGS) doesn't support required
C++20 features.])]
+ )
+ AC_LANG_POP([C++])
fi
dnl These options must be always used for lmi unit tests to pass.
- [lmi-commits] [lmi] master 2537153 26/28: Fix test_path_validation() for compilers without char8_t support, (continued)
- [lmi-commits] [lmi] master 2537153 26/28: Fix test_path_validation() for compilers without char8_t support, Greg Chicares, 2021/05/12
- [lmi-commits] [lmi] master 0ed65f7 28/28: Restore (commented out) a test that failed spectacularly, Greg Chicares, 2021/05/12
- [lmi-commits] [lmi] master 2808a1b 13/28: Use consistent flags for Boost.Regex build in the CI job, Greg Chicares, 2021/05/12
- [lmi-commits] [lmi] master 521017e 05/28: Show environment and compiler information in the CI output, Greg Chicares, 2021/05/12
- [lmi-commits] [lmi] master e94f977 15/28: Run CI job steps as non-root container user, Greg Chicares, 2021/05/12
- [lmi-commits] [lmi] master 2213a23 22/28: Disable clang deprecated declarations warnings in uBLAS headers, Greg Chicares, 2021/05/12
- [lmi-commits] [lmi] master 7e32f37 02/28: Don't build Boost.Filesystem library in the CI builds any more, Greg Chicares, 2021/05/12
- [lmi-commits] [lmi] master 0713a8f 14/28: Don't put NORMAL_UID in the environment unnecessarily, Greg Chicares, 2021/05/12
- [lmi-commits] [lmi] master aa750df 12/28: Work around global_settings_test failure in autotools builds, Greg Chicares, 2021/05/12
- [lmi-commits] [lmi] master 0d89ef3 07/28: Install sudo without using sudo, Greg Chicares, 2021/05/12
- [lmi-commits] [lmi] master 2814dec 11/28: Check for comparison operator defaulting in configure C++ test,
Greg Chicares <=
- [lmi-commits] [lmi] master e5160fe 20/28: Revert "Add workaround for Boost.Regex compilation with clang 11", Greg Chicares, 2021/05/12
- [lmi-commits] [lmi] master d09dfce 17/28: Merge lmi directories creation step with the system setup one, Greg Chicares, 2021/05/12
- [lmi-commits] [lmi] master 95c9f72 08/28: Use Debian Wine version in CI job, Greg Chicares, 2021/05/12
- [lmi-commits] [lmi] master 4a1c735 19/28: Rename CI job and build names for brevity and consistency, Greg Chicares, 2021/05/12
- [lmi-commits] [lmi] master e46db7c 21/28: Work around std::allocator::size_type problem in clang 11 libc++, Greg Chicares, 2021/05/12
- [lmi-commits] [lmi] master 4a09a23 09/28: Work around JRE installation problem in Debian slim container, Greg Chicares, 2021/05/12
- [lmi-commits] [lmi] master 21706da 25/28: Fix expression_template_0_test compilation with clang 12, Greg Chicares, 2021/05/12
- [lmi-commits] [lmi] master c4a85fc 06/28: Install the required packages before checkout in the CI job, Greg Chicares, 2021/05/12
- [lmi-commits] [lmi] master 5d5054f 18/28: Use correct permissions for the Git checkout, Greg Chicares, 2021/05/12
- [lmi-commits] [lmi] master 3a89381 24/28: Create /tmp/.X11-unix directory before running Xvfb, Greg Chicares, 2021/05/12