Error with implicit cast of ^^=
wjoe
invalid at example.com
Thu Jul 15 11:21:12 UTC 2021
On Wednesday, 14 July 2021 at 17:29:04 UTC, Ali Çehreli wrote:
> On 7/14/21 2:44 AM, wjoe wrote:
>
> >> x = (x ^^ y).to!(typeof(x));
> >> }
> >>
> >> For example, run-time error if y == 7.
>
> > I was planning on adding support for over-/underflow bits but
> this is
> > much better. Thanks!
>
> If so, then there is also std.experimental.checkedint:
>
> https://dlang.org/phobos/std_experimental_checkedint.html
>
> Andrei Alexandrescu introduced it in this presentation:
>
> https://dconf.org/2017/talks/alexandrescu.html
>
> Ali
Thanks I'll have a look.
More information about the Digitalmars-d-learn
mailing list