Why code failed to compile for foo2?
Adam Ruppe
destructionator at gmail.com
Sat Dec 11 23:44:59 UTC 2021
On Saturday, 11 December 2021 at 23:17:17 UTC, Stanislav Blinov
wrote:
> ? No. If it was unsatisfied constraint, the error would've
> shown that.
And if you try to instantiate it, you'll see it is an unsatisfied
constraint anyway. There's two layers of failure here.
Using Unqual there is pretty iffy, i wouldn't bother with it at
all, but if you do anything, instead qualify it const.
But either way, then the constraint still fails since int isn't
unsigned.
I'd really recommend simplifying this a lot.
More information about the Digitalmars-d-learn
mailing list