Skip to content

Require C++17 and fix the CI standard matrix (after #112) - #126

Merged
skilledwolf merged 3 commits into
masterfrom
build/cxx17-floor
Aug 19, 2026
Merged

Require C++17 and fix the CI standard matrix (after #112)#126
skilledwolf merged 3 commits into
masterfrom
build/cxx17-floor

Conversation

@skilledwolf

@skilledwolf skilledwolf commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

Summary

Raise the minimum C++ standard from C++14 to C++17 and ensure CI builds with the standard selected by each matrix job.

Previously, CI passed -std=c++XX through CMAKE_CXX_FLAGS, but the project’s unconditional CMAKE_CXX_STANDARD=14 took precedence. As a result, the C++17/20/23 jobs all built as C++14.

Changes

  • Default to C++17 while allowing callers to select C++20 or C++23.
  • Test C++20 and C++23 explicitly; the rest of the matrix covers C++17.
  • Fix compatibility issues exposed by genuine C++17+ builds.
  • Set GCC 11 and Clang 14 as the oldest tested compilers.
  • Update compiler requirements and remove two unused legacy files.

Verification

Verified C++17, C++20, and C++23 builds across GCC 11–16 and Clang 14–22 on my fork.

skilledwolf and others added 3 commits August 18, 2026 16:25
C++17 added std::size and std::data. Arguments whose types carry std
template arguments (std::vector, mcdata<std::vector<T>>, ...) pull
namespace std in via ADL, making unqualified size()/data() calls that
previously resolved to alps::size/alps::data ambiguous. Qualify the
call sites in alea/mcanalyze.hpp, alea/mcdata.hpp,
numeric/vector_valarray_conversion.hpp, and test/alea/mcanalyze.C.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
non_pod's mixed-type friends delegated T==non_pod to non_pod==T, which
under C++20 operator rewriting resolves back to the same friend as a
reversed candidate: infinite recursion (a hang at -O3, stack overflow
at -O0). test_deque/test_vector timed out at 600 s in the first real
C++23 CI run. Compare data_ directly instead. Verified with g++ 16
-std=c++23 -O3: both tests pass.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
CI has been sweeping C++11-23 by passing -std=c++XX via CMAKE_CXX_FLAGS,
but the unconditional set(CMAKE_CXX_STANDARD 14) appended its own
-std flag afterwards, so every job silently built C++14. CONTRIBUTING.md
has claimed C++17 all along; this makes the build match the docs.

- CMakeLists.txt now defaults CMAKE_CXX_STANDARD to 17 and honors
  -DCMAKE_CXX_STANDARD=20/23; CI passes the standard that way instead of
  through CMAKE_CXX_FLAGS. The sweep tests 20/23 on top of the 17
  baseline (the 11/14 entries are gone with the floor raise).
- Remove ' throw (std::runtime_error)' exception specifications in
  src/ietl/krylov_wrapper.h (ill-formed since C++17) and the dead,
  never-included src/boost/function_objects.hpp (std::binary_function
  was removed in C++17).
- Drop GCC 10 / Clang 13 from the matrix; GCC 11 / Clang 14 (Ubuntu
  22.04 / RHEL 9 defaults) are the new tested floor.
- Delete requirements.txt: unreferenced, and its numpy<2.1 ceiling
  contradicted pyproject.toml and CI reality.

Verified on the skilledwolf/ALPS fork: full builds green at C++17/20/23
with GCC 11-16 and Clang 14-22.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@skilledwolf skilledwolf self-assigned this Aug 18, 2026
@skilledwolf skilledwolf changed the title Floor at C++17 and actually build the C++ standard CI sweeps Require C++17 and fix the CI standard matrix Aug 18, 2026
@skilledwolf
skilledwolf marked this pull request as ready for review August 18, 2026 21:37
@skilledwolf skilledwolf changed the title Require C++17 and fix the CI standard matrix Require C++17 and fix the CI standard matrix (after #112) Aug 18, 2026
Base automatically changed from cleanup/root-layout to master August 19, 2026 03:09
@skilledwolf
skilledwolf merged commit d273d0c into master Aug 19, 2026
68 checks passed
@skilledwolf
skilledwolf deleted the build/cxx17-floor branch August 19, 2026 03:47
@egull

egull commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

I know I'm late to the party – but is there a good reason to disallow C++-14, i.e. any feature that requires C++-14? If not, can we allow it again and lower the floor back down to C++-14?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants