Skip to content

scan: drop the unused ascending() helper - #161

Merged
christianparpart merged 2 commits into
masterfrom
fix/ascending-without-simd
Nov 20, 2026
Merged

christianparpart merged 2 commits into
masterfrom
fix/ascending-without-simd

Conversation

@christianparpart

Copy link
Copy Markdown
Member

Problem

template <typename T> constexpr bool ascending(...) in scan.cpp's anonymous namespace has no caller in any configuration (none, intrinsics, std). Clang's -Wunused-template turns that into a hard error under -Werror. The motivating consumer is core-cpp's wasm32-wasip1 build (which forces LIBUNICODE_SIMD_IMPLEMENTATION=none); it currently has to silence the warning on libunicode's target.

Fix

Delete the dead helper. A preprocessor guard wouldn't help, because nothing uses it in any build. No behaviour change.

Verification

  • clang, -Wunused-template -Werror plus the pedantic flags: scan.cpp failed on master with none, intrinsics and std. With this change it compiles in all three, and the unicode library target builds cleanly with none and intrinsics.
  • unicode_test: none 124604 assertions, intrinsics 140938 assertions, all passing.
  • wasm32-wasip1 (wasi-sdk 34): scan.cpp with -Werror -Wunused-template fails on master and compiles with this change.
  • Already broken on master and not touched here: with libstdc++ 16, std fails in <experimental/simd> (convert512.cpp, scan512.cpp), and clang -pedantic -Werror rejects Catch2's __COUNTER__ in the test sources.

The function template in scan.cpp's anonymous namespace has had no
caller since it was introduced, in any SIMD configuration. Clang's
-Wunused-template therefore rejects scan.cpp under -Werror, which
consumers that build libunicode with that warning enabled (core-cpp's
wasm32-wasip1 build, where LIBUNICODE_SIMD_IMPLEMENTATION=none) have had
to silence on libunicode's target.

No behaviour change.

Signed-off-by: Christian Parpart <christian@parpart.family>
@codecov

codecov Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.47%. Comparing base (25909cd) to head (8447d35).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #161      +/-   ##
==========================================
+ Coverage   90.25%   90.47%   +0.22%     
==========================================
  Files          37       37              
  Lines        1816     1816              
==========================================
+ Hits         1639     1643       +4     
+ Misses        177      173       -4     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

GitHub retired the macOS 14 runner images on November 2, 2026, so jobs
asking for macos-14 are now rejected before they start. macos-15 is the
standard arm64 runner, matching what the jobs built for (and the
unicode-query-macos-arm64 artifact name).

Signed-off-by: Christian Parpart <christian@parpart.family>
@github-actions github-actions Bot added the CI label Nov 16, 2026
@christianparpart
christianparpart merged commit 4cdda6c into master Nov 20, 2026
14 checks passed
@christianparpart
christianparpart deleted the fix/ascending-without-simd branch November 20, 2026 05:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant