-
-
Notifications
You must be signed in to change notification settings - Fork 726
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
add std.experimental.checkedint #4613
Conversation
Line 177 you have a typo in the comment. ~= should be != |
@thewilsonator fixed, thx! |
You've got style failures with Travis. |
posix.mak
Outdated
@@ -170,7 +170,7 @@ PACKAGE_std = array ascii base64 bigint bitmanip compiler complex concurrency \ | |||
outbuffer parallelism path process random signals socket socketstream stdint \ | |||
stdio stdiobase stream string system traits typecons typetuple uni \ | |||
uri utf uuid variant xml zip zlib | |||
PACKAGE_std_experimental = typecons | |||
PACKAGE_std_experimental = checkedint typecons |
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.
it's annoying and we should really get rid off these two additional files, but until we do you need to update win32.mak
& win64.mak
too
Btw see this thread for the current status.
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.
I was glad I don't need to modify other places as well :o). Anyhow I made the changes to winNN.mak as well.
Could use some module level examples as well to help with the introduction. |
std/experimental/checkedint.d
Outdated
struct Checked(T, Hook = Croak) | ||
if (isIntegral!T && is(T == Unqual!T) || is(T == Checked!(U, H), U, H)) | ||
{ | ||
import std.algorithm : among; |
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.
import std.algorithm.comparison : among;
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.
noice
|
std/experimental/checkedint.d
Outdated
{ | ||
alias Result = typeof(lhs + rhs); | ||
import core.checkedint; | ||
import std.algorithm : among; |
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.
import std.algorithm.comparison : among;
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.
noice
|
Where is the dub package? |
The handling of return types is inconsistent: 1) Is the 2) When a 3) Is it permitted to return some other type where a Whatever restrictions are placed on the return types should be documented somewhere - preferably in the function signature, instead of using |
…Bound/onUpperBound
Auto-merge toggled on |
@andralex could you please create a PR for the changelog, so checkedint appears in the next release notes. |
How about adding a changelog file that shows-off a couple of features to the reader? |
Merging is blocked, it needs to be approved |
@burner will work on the changelog. Thanks! |
... -> #5188 |
This is the checkedint design I was discussing recently in the forum. It's work in progress - I think a couple more policies would be useful.