Skip to content

fix(run_async): keep allocator arguments out of handler deduction#369

Merged
sgerbino merged 1 commit into
cppalliance:developfrom
sgerbino:fix/run-async-allocator-overload
Jul 23, 2026
Merged

fix(run_async): keep allocator arguments out of handler deduction#369
sgerbino merged 1 commit into
cppalliance:developfrom
sgerbino:fix/run-async-allocator-overload

Conversation

@sgerbino

Copy link
Copy Markdown
Collaborator

A pointer to a derived memory resource deduced as an exact-match completion handler, beating the memory_resource* overloads that need a derived-to-base conversion, then failing to instantiate when the pointer was invoked. The same hijack applied to the second handler position and, once constrained naively, made allocator values ambiguous against the value-allocator overloads.

Constrain every deduced handler position with a RunAsyncHandler concept that excludes the types meaningful to the other parameters: memory resource pointers, stop tokens, and allocators.

A pointer to a derived memory resource deduced as an exact-match
completion handler, beating the memory_resource* overloads that need
a derived-to-base conversion, then failing to instantiate when the
pointer was invoked. The same hijack applied to the second handler
position and, once constrained naively, made allocator values
ambiguous against the value-allocator overloads.

Constrain every deduced handler position with a RunAsyncHandler
concept that excludes the types meaningful to the other parameters:
memory resource pointers, stop tokens, and allocators.
@sgerbino
sgerbino force-pushed the fix/run-async-allocator-overload branch from 39ecbe9 to d81c4eb Compare July 23, 2026 13:53
@cppalliance-bot

Copy link
Copy Markdown

An automated preview of the documentation is available at https://369.capy.prtest3.cppalliance.org/index.html

If more commits are pushed to the pull request, the docs will rebuild at the same URL.

2026-07-23 13:57:11 UTC

@cppalliance-bot

Copy link
Copy Markdown

GCOVR code coverage report https://369.capy.prtest3.cppalliance.org/gcovr/index.html
LCOV code coverage report https://369.capy.prtest3.cppalliance.org/genhtml/index.html
Coverage Diff Report https://369.capy.prtest3.cppalliance.org/diff-report/index.html

Build time: 2026-07-23 14:11:54 UTC

@codecov

codecov Bot commented Jul 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.33%. Comparing base (49b2db9) to head (d81c4eb).
⚠️ Report is 4 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #369      +/-   ##
===========================================
+ Coverage    98.18%   98.33%   +0.15%     
===========================================
  Files          152      152              
  Lines         8246     8288      +42     
===========================================
+ Hits          8096     8150      +54     
+ Misses         150      138      -12     
Flag Coverage Δ
linux 98.32% <ø> (+0.16%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
include/boost/capy/ex/run_async.hpp 100.00% <ø> (ø)

... and 3 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 49b2db9...d81c4eb. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sgerbino
sgerbino merged commit 26547e7 into cppalliance:develop Jul 23, 2026
38 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in Beast2 Jul 23, 2026
@sgerbino
sgerbino deleted the fix/run-async-allocator-overload branch July 23, 2026 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants