A technique to mock "static interfaces" (e.g. isInputRange)

Atila Neves via Digitalmars-d digitalmars-d at puremagic.com
Thu May 26 02:40:26 PDT 2016


On Wednesday, 25 May 2016 at 21:52:37 UTC, Alex Parrill wrote:
> On Wednesday, 25 May 2016 at 21:38:23 UTC, Atila Neves wrote:
>> [...]
>
> Have you looked at std.typecons.AutoImplement at all? 
> http://dlang.org/phobos/std_typecons.html#.AutoImplement

I'd never seen it before, thanks! Doesn't do the same thing - I 
was trying to get a struct that could be passed to generic 
algorithms, and that could be programmed like a regular mock. My 
example only shows return value programming, but it was a quick 
and dirty prototype.

Atila


More information about the Digitalmars-d mailing list