Skip to content

add missing inplace_stop_callback::callback_type - #2290

Open
kwy404 wants to merge 1 commit into
NVIDIA:mainfrom
kwy404:fix/inplace-stop-callback-type
Open

kwy404 wants to merge 1 commit into
NVIDIA:mainfrom
kwy404:fix/inplace-stop-callback-type

Conversation

@kwy404

@kwy404 kwy404 commented Sep 26, 2026

Copy link
Copy Markdown

The standard declares a public member type alias in inplace_stop_callback (stopcallback.inplace.general):

using callback_type = CallbackFn;

stdexec did not declare it, so inplace_stop_callback<F>::callback_type failed to compile (MSVC: "error C2039: 'callback_type': is not a member of 'std::inplace_stop_callback<...>'").

This adds the alias at the top of the class, plus a test in test_concepts_stop_tokens.cpp that checks it names the callback type.

Tested locally with MSVC 14.44 (Debug): the new test fails to compile without the fix and passes with it, and the rest of test.stdexec passes too (test_any.cpp was left out of the local build because this MSVC version hits an internal compiler error on it, on main as well). clang-format 21 reports no changes on the touched files.

[stopcallback.inplace.general] declares `using callback_type =
CallbackFn;` as a public member of `inplace_stop_callback`. stdexec
did not provide it, so `inplace_stop_callback<F>::callback_type`
failed to compile. Add the alias and a test.
@copy-pr-bot

copy-pr-bot Bot commented Sep 26, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

This branch has not been deployed

No deployments
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.

1 participant