Creating a "fixed-range int" with opDispatch and/or alias this?

Rene Zwanenburg via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Jun 1 13:46:06 PDT 2016


On Wednesday, 1 June 2016 at 19:59:51 UTC, Mark Isaacson wrote:
> FWIW, the fixed range int part of this question is just an 
> example, I'm mostly just interested in whether this idea is 
> possible without a lot of bloat/duplication.

I suspect not.. Here's how std.typecons.Proxy is doing it:

https://github.com/dlang/phobos/blob/master/std/typecons.d#L5109


More information about the Digitalmars-d-learn mailing list