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. |
| 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.
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.
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.
import std.algorithm.comparison : among;
|
|
std/experimental/checkedint.d
Outdated
| { | ||
| alias Result = typeof(lhs + rhs); | ||
| import core.checkedint; | ||
| import std.algorithm : among; |
There was a problem hiding this comment.
import std.algorithm.comparison : among;
|
|
|
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.