Add public type aliases for detail types in when_any/when_all APIs#203
Add public type aliases for detail types in when_any/when_all APIs#203mvandeberg wants to merge 1 commit intocppalliance:developfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (4)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughExposes Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
An automated preview of the documentation is available at https://203.capy.prtest3.cppalliance.org/index.html If more commits are pushed to the pull request, the docs will rebuild at the same URL. 2026-03-04 21:41:43 UTC |
|
GCOVR code coverage report https://203.capy.prtest3.cppalliance.org/gcovr/index.html Build time: 2026-03-04 21:55:51 UTC |
9ad460b to
fa28e43
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@include/boost/capy/when_any.hpp`:
- Around line 562-563: Remove the Javadoc `@tparam As` entry for the variadic
template pack and leave the `@param as` description intact; specifically, in the
when_any async variadic overload in when_any.hpp delete the `@tparam As
Awaitable types (each must satisfy IoAwaitable).` line and, if needed, move any
concept requirement text into the main description (not as a `@tparam`) so the
variadic pack As is not documented with a `@tparam` tag.
- Around line 578-580: The variadic when_any template currently permits zero
arguments, yielding an invalid empty std::variant; change the template signature
to require at least one awaitable (e.g., replace template<IoAwaitable... As>
with template<IoAwaitable A0, IoAwaitable... As> and adjust the return type to
use A0, As... with void_to_monostate_t<awaitable_result_t<...>> so an empty pack
is impossible), and update occurrences referencing when_any accordingly; also
remove the `@tparam` As line from the function javadoc to follow the guideline
that variadic template parameters should not be documented.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 249b7904-5bbf-4f1c-a78a-5183ea0e790e
⛔ Files ignored due to path filters (1)
test/unit/when_all.cppis excluded by!**/test/**
📒 Files selected for processing (4)
example/async-mutex/async_mutex.cppinclude/boost/capy/concept/io_awaitable.hppinclude/boost/capy/when_all.hppinclude/boost/capy/when_any.hpp
💤 Files with no reviewable changes (1)
- example/async-mutex/async_mutex.cpp
fa28e43 to
b9ea7eb
Compare
There was a problem hiding this comment.
♻️ Duplicate comments (1)
include/boost/capy/when_any.hpp (1)
562-563:⚠️ Potential issue | 🟡 MinorRemove variadic
@tparam Asfrom this async overload docblock.Line 562 still documents variadic template args with
@tparam, which violates the async javadoc rule for variadic packs.📝 Suggested doc edit
- `@tparam` As Awaitable types (each must satisfy IoAwaitable). `@param` as Awaitables to race concurrently.As per coding guidelines: "Document tparam in async/awaitable function javadoc for non-variadic template parameters, stating concept requirements and not documenting variadic Args...".
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@include/boost/capy/when_any.hpp` around lines 562 - 563, Remove the variadic template `@tparam` As entry from the async overload docblock in include/boost/capy/when_any.hpp: locate the async overload's comment block (the one that currently lists "@tparam As Awaitable types (each must satisfy IoAwaitable)." above "@param as Awaitables to race concurrently.") and delete the `@tparam` As line so the docblock no longer documents a variadic template parameter; keep the `@param` as line and ensure only non-variadic template parameters are documented elsewhere per the async/awaitable documentation rules.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In `@include/boost/capy/when_any.hpp`:
- Around line 562-563: Remove the variadic template `@tparam` As entry from the
async overload docblock in include/boost/capy/when_any.hpp: locate the async
overload's comment block (the one that currently lists "@tparam As Awaitable
types (each must satisfy IoAwaitable)." above "@param as Awaitables to race
concurrently.") and delete the `@tparam` As line so the docblock no longer
documents a variadic template parameter; keep the `@param` as line and ensure only
non-variadic template parameters are documented elsewhere per the
async/awaitable documentation rules.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 55af6c93-6d31-4564-9375-dd1b7badcce8
⛔ Files ignored due to path filters (1)
test/unit/when_all.cppis excluded by!**/test/**
📒 Files selected for processing (4)
example/async-mutex/async_mutex.cppinclude/boost/capy/concept/io_awaitable.hppinclude/boost/capy/when_all.hppinclude/boost/capy/when_any.hpp
💤 Files with no reviewable changes (1)
- example/async-mutex/async_mutex.cpp
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #203 +/- ##
===========================================
+ Coverage 91.71% 91.89% +0.18%
===========================================
Files 76 76
Lines 4488 4504 +16
===========================================
+ Hits 4116 4139 +23
+ Misses 372 365 -7
... and 6 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
b9ea7eb to
542f0b2
Compare
Type traits used in when_any/when_all return types were in detail::, forcing users to reach into the detail namespace to name them. Move these traits to the public namespace with descriptive names so signatures are self-documenting: - awaitable_result_t<A>: the return type of co_await on an awaitable - void_to_monostate_t<T>: maps void to std::monostate for variant storage - non_void_tuple_t<Ts...>: a tuple with void types filtered out when_any now returns std::variant<void_to_monostate_t<...>...> directly in its signature instead of hiding behind an alias. when_all uses non_void_tuple_t in its signature. Both are immediately readable without chasing type aliases. Also simplify when_any_state to use a flat parameter pack (Ts...) instead of requiring the first type separately (T0, Ts...).
542f0b2 to
2281eb3
Compare
There was a problem hiding this comment.
♻️ Duplicate comments (1)
include/boost/capy/when_any.hpp (1)
562-563:⚠️ Potential issue | 🟡 MinorRemove variadic
@tparam Asfrom this async overload javadoc.Line 562 still documents a variadic template pack with
@tparam, which conflicts with the repo async-doc rule.As per coding guidelines: "Document tparam in async/awaitable function javadoc for non-variadic template parameters, stating concept requirements and not documenting variadic Args...".📝 Suggested doc fix
- `@tparam` As Awaitable types (each must satisfy IoAwaitable; at least one required). `@param` as Awaitables to race concurrently (must not be empty).🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@include/boost/capy/when_any.hpp` around lines 562 - 563, The javadoc for the async overload of when_any in include/boost/capy/when_any.hpp incorrectly documents a variadic template pack with "@tparam As"; remove that variadic "@tparam As" line from the async/awaitable overload's comment and instead ensure the comment states the requirement in prose (e.g., "Awaitables to race concurrently (must not be empty); each must satisfy IoAwaitable") next to the "@param as" description for the when_any async overload so it conforms to the repo async-doc rule.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In `@include/boost/capy/when_any.hpp`:
- Around line 562-563: The javadoc for the async overload of when_any in
include/boost/capy/when_any.hpp incorrectly documents a variadic template pack
with "@tparam As"; remove that variadic "@tparam As" line from the
async/awaitable overload's comment and instead ensure the comment states the
requirement in prose (e.g., "Awaitables to race concurrently (must not be
empty); each must satisfy IoAwaitable") next to the "@param as" description for
the when_any async overload so it conforms to the repo async-doc rule.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 5527a05e-752d-450a-93ed-fe3112e1413d
⛔ Files ignored due to path filters (1)
test/unit/when_all.cppis excluded by!**/test/**
📒 Files selected for processing (4)
example/async-mutex/async_mutex.cppinclude/boost/capy/concept/io_awaitable.hppinclude/boost/capy/when_all.hppinclude/boost/capy/when_any.hpp
💤 Files with no reviewable changes (1)
- example/async-mutex/async_mutex.cpp
Addresses #160. Public function signatures referenced detail:: types that users cannot name without reaching into the detail namespace. Add awaitable_result_type, when_any_result_type, and when_all_result_type as public aliases, and update all when_any and when_all signatures to use them. Simplify when_any_variant_t and when_any_state to use a flat parameter pack instead of requiring the first type separately.
Summary by CodeRabbit
New Features
Refactor
Documentation