New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Issue 18952 - std.experimental.checkedint.Saturate prints integral promotion deprecation message #6549
Conversation
Thanks for your pull request, @wilzbach! Bugzilla references
Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub fetch digger
dub run digger -- build "master + phobos#6549" |
std/experimental/checkedint.d
Outdated
assert(x.isNaN); | ||
} | ||
|
||
// ProperCompare fixes the comparison operators ==, !=, <, <=, >, and >= to return correct results |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably doc comment with ///
std/experimental/checkedint.d
Outdated
assert(y > -1); // ProperCompare | ||
} | ||
|
||
// Throws fails every incorrect operation by throwing an exception |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably doc comment with ///
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe backtick "Saturate", "WithNan" etc, or anything else that make them distinguishable from the verb.
std/experimental/checkedint.d
Outdated
assert(y > -1); // ProperCompare | ||
} | ||
|
||
/// Throws fails every incorrect operation by throwing an exception |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Throw
without s
…l promotion deprecation message
Good idea to use backticks. Thanks! |
Also added a few public documentation examples as unittests.
I added them in the top as there was only one high-level example.