Skip to content

fix compiler error in unstoppable_token concept - #2559

Draft
armpribb wants to merge 1 commit into
NVIDIA:mainfrom
armpribb:fix/unstoppable-token-constexpr
Draft

armpribb wants to merge 1 commit into
NVIDIA:mainfrom
armpribb:fix/unstoppable-token-constexpr

Conversation

@armpribb

Copy link
Copy Markdown
Contributor

Currently, a copyable stop token with a non-constexpr static stop_possible() can satisfy stoppable_token, but checking unstoppable_token produces a compiler error.

Reproduction:
https://godbolt.org/z/q4qrWxh5Y

After the fix the concept will evaluate such a stop token to false instead.
This should also match the ISO draft: https://eel.is/c++draft/stoptoken.concepts#4

@copy-pr-bot

copy-pr-bot Bot commented Nov 27, 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.

@ericniebler

Copy link
Copy Markdown
Collaborator

/ok to test 2823452

a copyable stop token with non-constexpr static stop_possible() will
evaluate to false now instead.
@armpribb
armpribb force-pushed the fix/unstoppable-token-constexpr branch from 2823452 to 8078677 Compare November 27, 2026 22:17
@ericniebler

Copy link
Copy Markdown
Collaborator

/ok to test 8078677

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.

2 participants