Do you like bounded integrals?
Cauterite via Digitalmars-d
digitalmars-d at puremagic.com
Tue Aug 23 13:54:31 PDT 2016
On Tuesday, 23 August 2016 at 20:40:06 UTC, Andrei Alexandrescu
wrote:
> I think all of these questions have answers, but I wanted to
> gauge the interest in bounded checked integrals. Would the need
> for them justify additional complications in the definition?
Well, this occurs very frequently in my code:
struct S {
int foo;
invariant {
assert(ordered_(MIN, foo, MAX));
};
};
If bounded integers can handle this for me then you've got my
support. Assuming the checks disappear in -release.
More information about the Digitalmars-d
mailing list