From 8b56e2095810052dc55b29540df016fb1dbe9e5f Mon Sep 17 00:00:00 2001 From: Carson Radtke Date: Mon, 13 Jul 2026 15:04:32 -0600 Subject: [PATCH 1/4] ci: windows-2025 image -> use VS2026 For more info: https://github.com/actions/runner-images/issues/14017 --- .github/workflows/compilers.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/compilers.yml b/.github/workflows/compilers.yml index 6681e1a15..4d1479d6f 100644 --- a/.github/workflows/compilers.yml +++ b/.github/workflows/compilers.yml @@ -88,9 +88,13 @@ jobs: # Regular MSVC builds use Ninja (from preset) - toolset: 'msvc' generator_override: '' - # ClangCL builds require Visual Studio generator - - toolset: 'ClangCL' + # ClangCL builds require Visual Studio generator; version depends on image + - image: windows-2022 + toolset: 'ClangCL' generator_override: '-G "Visual Studio 17 2022" -T ClangCL' + - image: windows-2025 + toolset: 'ClangCL' + generator_override: '-G "Visual Studio 18 2026" -T ClangCL' runs-on: ${{ matrix.image }} steps: - uses: actions/checkout@v6 From 9899e0e325aad1fc1353f074055c341c3dc636ad Mon Sep 17 00:00:00 2001 From: Carson Radtke Date: Mon, 13 Jul 2026 15:14:21 -0600 Subject: [PATCH 2/4] ci: macos -> use xcode 26.6 For more info: https://github.com/actions/runner-images/issues/13345 --- .github/workflows/compilers.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/compilers.yml b/.github/workflows/compilers.yml index 4d1479d6f..fd56e8e61 100644 --- a/.github/workflows/compilers.yml +++ b/.github/workflows/compilers.yml @@ -61,7 +61,7 @@ jobs: xcode: strategy: matrix: - xcode_version: [ '16.4' ] + xcode_version: [ '26.6' ] build_type: [ Debug, Release ] cxx_version: [ 14, 17, 20, 23 ] runs-on: macos-latest From 835e39e3e4d8206d70683dc3d0e85bd76214dabc Mon Sep 17 00:00:00 2001 From: Carson Radtke Date: Mon, 13 Jul 2026 15:23:50 -0600 Subject: [PATCH 3/4] fix -Wnrvo instance in dyn_array --- include/gsl/dyn_array | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/include/gsl/dyn_array b/include/gsl/dyn_array index dd6517d4c..550cc26be 100644 --- a/include/gsl/dyn_array +++ b/include/gsl/dyn_array @@ -216,9 +216,8 @@ namespace details constexpr auto operator++(int) { - auto rv = *this; ++(*this); - return rv; + return dyn_array_iterator{_ptr, _pos - 1, _end_pos}; } constexpr auto operator--() -> dyn_array_iterator& @@ -230,9 +229,8 @@ namespace details constexpr auto operator--(int) { - auto rv = *this; --(*this); - return rv; + return dyn_array_iterator{_ptr, _pos + 1, _end_pos}; } constexpr auto operator+=(difference_type diff) -> dyn_array_iterator& From efaafc26d4fa48d90437df885238deec8bf830e4 Mon Sep 17 00:00:00 2001 From: Carson Radtke Date: Mon, 13 Jul 2026 15:41:34 -0600 Subject: [PATCH 4/4] suppress build error in gtest w/ clangcl --- include/gsl/assert | 3 +++ include/gsl/util | 9 +++++++++ tests/CMakeLists.txt | 10 +++++++++- tests/dyn_array_tests.cpp | 7 +++++++ 4 files changed, 28 insertions(+), 1 deletion(-) diff --git a/include/gsl/assert b/include/gsl/assert index 5181c131d..daa1a75c3 100644 --- a/include/gsl/assert +++ b/include/gsl/assert @@ -31,6 +31,9 @@ #if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winvalid-noreturn" +#if __clang_major__ >= 22 +#pragma clang diagnostic ignored "-Wunique-object-duplication" +#endif // __clang_major >= 22 #endif // defined(__clang__) #else // defined(_MSC_VER) && (defined(_KERNEL_MODE) || (defined(_HAS_EXCEPTIONS) && diff --git a/include/gsl/util b/include/gsl/util index cc171d254..9c2627e02 100644 --- a/include/gsl/util +++ b/include/gsl/util @@ -133,6 +133,12 @@ namespace details } // namespace details // final_action allows you to ensure something gets run at the end of a scope +// The bool member causes trailing padding when F has alignment > 1; suppress +// -Wpadded since the padding is unavoidable for a generic callable wrapper. +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wpadded" +#endif // defined(__clang__) template class final_action { @@ -157,6 +163,9 @@ private: F f; bool invoke = true; }; +#if defined(__clang__) +#pragma clang diagnostic pop +#endif // defined(__clang__) // finally() - convenience function to generate a final_action template diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 3ec624c18..92fee7d9f 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -54,6 +54,14 @@ if (NOT GTestMain_FOUND) ${CMAKE_CURRENT_BINARY_DIR}/googletest-build EXCLUDE_FROM_ALL ) + + # googletest is built as its own target, so apply this workaround there. + if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" + AND CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC" + AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 22) + target_compile_options(gtest PRIVATE -Wno-character-conversion) + target_compile_options(gtest_main PRIVATE -Wno-character-conversion) + endif() endif() if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR) @@ -111,7 +119,7 @@ if(MSVC) # MSVC or simulating MSVC -Wno-undef # GTest -Wno-used-but-marked-unused # GTest EXPECT_DEATH -Wno-switch-default # GTest EXPECT_DEATH - $<$: # no support for [[maybe_unused]] + $<$: # no support for [[maybe_unused]] -Wno-unused-member-function -Wno-unused-variable $<$,15.0.1>: diff --git a/tests/dyn_array_tests.cpp b/tests/dyn_array_tests.cpp index f67850f4b..80bca7a0b 100644 --- a/tests/dyn_array_tests.cpp +++ b/tests/dyn_array_tests.cpp @@ -189,6 +189,10 @@ TEST(dyn_array_tests, ranges) #endif /* __cpp_lib_ranges >= 201911L */ #if defined(__cpp_lib_constexpr_dynamic_alloc) && (__cpp_lib_constexpr_dynamic_alloc >= 201907L) +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wpadded" +#endif // defined(__clang__) template struct ConstexprAllocator { @@ -218,6 +222,9 @@ struct ConstexprAllocator constexpr void deallocate(value_type*, std::size_t) noexcept {} }; +#if defined(__clang__) +#pragma clang diagnostic pop +#endif // defined(__clang__) template constexpr auto operator==(const ConstexprAllocator& lhs,