Skip to content

Align Executor concept and executor_ref with P4003#250

Open
mvandeberg wants to merge 1 commit intocppalliance:developfrom
mvandeberg:pr/4003-gaps
Open

Align Executor concept and executor_ref with P4003#250
mvandeberg wants to merge 1 commit intocppalliance:developfrom
mvandeberg:pr/4003-gaps

Conversation

@mvandeberg
Copy link
Copy Markdown
Contributor

@mvandeberg mvandeberg commented Apr 1, 2026

  • Executor concept: pass continuation by reference in requires-expression to match stable-address semantics of all implementations
  • executor_ref constructor: constrain to Executor to reject non-conforming types at the call site instead of deferring to vtable instantiation
  • executor_ref::target(): add noexcept to both overloads (trivially non-throwing type-id comparison and static_cast)

Summary by CodeRabbit

  • Refactor
    • Updated executor concept parameter binding requirements
    • Enhanced exception safety with noexcept annotations to executor reference methods

- Executor concept: pass continuation by reference in requires-expression
  to match stable-address semantics of all implementations
- executor_ref constructor: constrain to Executor to reject non-conforming
  types at the call site instead of deferring to vtable instantiation
- executor_ref::target(): add noexcept to both overloads (trivially
  non-throwing type-id comparison and static_cast)
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 1, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 3a94ad25-7b35-4e89-908d-62062ba7591e

📥 Commits

Reviewing files that changed from the base of the PR and between 8c2ca12 and c0988e2.

📒 Files selected for processing (2)
  • include/boost/capy/concept/executor.hpp
  • include/boost/capy/ex/executor_ref.hpp

📝 Walkthrough

Walkthrough

The PR refines the Executor concept by requiring dispatch/post methods to accept a non-const lvalue reference for continuation parameters, and strengthens executor_ref's constructor constraint while adding noexcept qualifiers to target() methods.

Changes

Cohort / File(s) Summary
Executor Concept Refinement
include/boost/capy/concept/executor.hpp
Modified Executor concept's requires clause to bind the last parameter of dispatch/post as a non-const lvalue reference (continuation& c instead of continuation c), tightening concept satisfaction rules.
Executor Reference Enhancements
include/boost/capy/ex/executor_ref.hpp
Added #include <boost/capy/concept/executor.hpp>, strengthened executor_ref(Ex const&) constructor template constraint with Executor<Ex> requirement, and added noexcept qualifiers to both target() const and target() method signatures.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 Hoppity-hop, the executor's refined,
Lvalue references now rightly bind,
Concepts tighten, noexcept gleams,
Carrots of safety in our type-checked dreams! 🥕✨

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Align Executor concept and executor_ref with P4003' accurately summarizes the main change, which involves aligning the Executor concept and executor_ref with P4003 specifications.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cppalliance-bot
Copy link
Copy Markdown

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

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

2026-04-01 22:51:51 UTC

@cppalliance-bot
Copy link
Copy Markdown

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

Build time: 2026-04-01 23:07:04 UTC

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.47%. Comparing base (8c2ca12) to head (c0988e2).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #250      +/-   ##
===========================================
- Coverage    92.50%   92.47%   -0.03%     
===========================================
  Files          170      170              
  Lines         9348     9348              
===========================================
- Hits          8647     8645       -2     
- Misses         701      703       +2     
Flag Coverage Δ
linux 92.46% <ø> (ø)

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

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

... and 2 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

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

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

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