From d8b676836e2a11e2569cdb2f626263041c537a1d Mon Sep 17 00:00:00 2001 From: Tristan Brindle Date: Tue, 5 Nov 2024 13:56:35 +0000 Subject: [PATCH 1/3] Add LLVM Clang 19 to MacOS test matrix --- .github/workflows/macos.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 3100679f..aad91333 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -14,7 +14,7 @@ jobs: runs-on: macos-latest strategy: matrix: - compiler: [GCC-13, LLVM-Clang-16, LLVM-Clang-17, LLVM-Clang-18] + compiler: [GCC-13, LLVM-Clang-16, LLVM-Clang-17, LLVM-Clang-18, LLVM-Clang-19] test_with: [Headers, Module] build_type: [Debug, Release] @@ -42,6 +42,10 @@ jobs: cxx: $(brew --prefix llvm@18)/bin/clang++ install: | brew install llvm@18 ninja + - compiler: LLVM-Clang-19 + cxx: $(brew --prefix llvm@19)/bin/clang++ + install: | + brew install llvm@19 ninja steps: From a298e228334bbfb0e3a6aac5ca0f10fb59f4080c Mon Sep 17 00:00:00 2001 From: Tristan Brindle Date: Tue, 5 Nov 2024 13:57:39 +0000 Subject: [PATCH 2/3] Add Clang 19 to Linux test matrix --- .github/workflows/linux.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 0c805e5b..960608e2 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - compiler: [GCC-11, GCC-12, GCC-13, GCC-14, Clang-17, Clang-18] + compiler: [GCC-11, GCC-12, GCC-13, GCC-14, Clang-17, Clang-18, Clang-19] test_with: [Headers, Module] build_type: [Debug, Release] @@ -56,6 +56,11 @@ jobs: install: | brew install llvm@18 ninja binutils brew link --force binutils + - compiler: Clang-19 + cxx: $(brew --prefix llvm@19)/bin/clang++ + install: | + brew install llvm@19 ninja binutils + brew link --force binutils steps: - uses: actions/checkout@master From e20f4322c29e84007d2560e91a911ef041d17a7d Mon Sep 17 00:00:00 2001 From: Tristan Brindle Date: Tue, 5 Nov 2024 15:43:25 +0000 Subject: [PATCH 3/3] Fix variant emplace with Clang19/libstdc++ I'm not quite sure what's changed with Clang 19, but it's suddenly complaining about libstdc++12's `variant` using the non-active member of a union in constexpr. It's possible there was such a bug in libstdc++12, but it seems weird that it wasn't picked up by either GCC12 or an older version of Clang... Anyway, hopefully this will fix it. --- include/flux/adaptor/flatten_with.hpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/include/flux/adaptor/flatten_with.hpp b/include/flux/adaptor/flatten_with.hpp index c3fef214..0b31a93e 100644 --- a/include/flux/adaptor/flatten_with.hpp +++ b/include/flux/adaptor/flatten_with.hpp @@ -19,14 +19,10 @@ namespace detail { template inline constexpr auto variant_emplace = [](std::variant& variant, auto&&... args) { - if constexpr (__cpp_lib_variant >= 202106L) { - variant.template emplace(FLUX_FWD(args)...); + if (std::is_constant_evaluated()) { + variant = std::variant(std::in_place_index, FLUX_FWD(args)...); // LCOV_EXCL_LINE } else { - if (std::is_constant_evaluated()) { - variant = std::variant(std::in_place_index, FLUX_FWD(args)...); // LCOV_EXCL_LINE - } else { - variant.template emplace(FLUX_FWD(args)...); - } + variant.template emplace(FLUX_FWD(args)...); } };