Skip to content

Fix #11017: drop unsupported bitwise ops from Saturate docs#11063

Open
AayushMainali-Github wants to merge 2 commits into
dlang:masterfrom
AayushMainali-Github:fix-11017-saturate-bitwise-docs
Open

Fix #11017: drop unsupported bitwise ops from Saturate docs#11063
AayushMainali-Github wants to merge 2 commits into
dlang:masterfrom
AayushMainali-Github:fix-11017-saturate-bitwise-docs

Conversation

@AayushMainali-Github

Copy link
Copy Markdown

Rationale

Saturate's documentation listed bitwise operators (&, |, ^, and the corresponding op-assign forms) among the supported operators, but using them hits static assert(false) in onOverflow.

This removes those operators from the documented lists so the docs only describe what Saturate actually implements. Added tests so that mismatch can't quietly come back.

Feature request or issue tracking

Closes #11017.

Pre-review checklist

  • I have performed a self-review of my code.
  • If my PR fixes a bug or introduces a new feature, I have added thorough tests.
  • If my changes are non-trivial and do not concern a reported issue, I have added a changelog entry.

LLM/AI disclosure

This PR was written with the assistance of an LLM/AI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[std.checkedint] Saturate claims to support bitwise operators, but doesn't

2 participants