isInputRange copied verbatim produces a different result than isInputRange from std.range

aliak something at something.com
Sun Mar 4 19:54:53 UTC 2018


On Sunday, 4 March 2018 at 13:17:30 UTC, Adam D. Ruppe wrote:
> On Sunday, 4 March 2018 at 12:57:41 UTC, aliak wrote:
>> @property int front(D d) { return 2; }
>> @property bool empty(D d) { return false; }
>> void popFront(D d) {}
>
> Those functions are in scope for your function, but not inside 
> std.range.
>
> in other words std.range hasn't imported your module, so it 
> can't see those three functions.

wait a minute... so I can't use any std.range functions on a type 
if I add the range primitives as free functions? O.o


More information about the Digitalmars-d-learn mailing list