address issue 200: use stop_callback_traits to support std::stop_token#202
Open
dietmarkuehl wants to merge 3 commits intomainfrom
Open
address issue 200: use stop_callback_traits to support std::stop_token#202dietmarkuehl wants to merge 3 commits intomainfrom
dietmarkuehl wants to merge 3 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the library’s stoppable-token infrastructure so std::stop_token can satisfy the stoppable_token concept (Issue 200).
Changes:
- Introduces
detail::stoppable_token_traitsto abstract how a token provides its stop-callback type (with a specialization forstd::stop_token). - Refactors
stoppable_tokenandstop_callback_for_tto use the new traits instead of directly requiringToken::callback_type. - Adds a regression test for
std::stop_tokenand wires it into the test CMake list.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/beman/execution/issue-200.test.cpp | Adds compile-time assertion that std::stop_token models stoppable_token. |
| tests/beman/execution/CMakeLists.txt | Registers the new Issue 200 test target. |
| include/beman/execution/detail/stoppable_token.hpp | Updates stoppable_token concept to validate callback support via stoppable_token_traits. |
| include/beman/execution/detail/stop_token_traits.hpp | New traits header providing a generic mapping + std::stop_token specialization. |
| include/beman/execution/detail/stop_callback_for_t.hpp | Updates stop_callback_for_t alias to use stoppable_token_traits. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.