Trouble creating bidirectional range

Timon Gehr timon.gehr at gmx.ch
Sun Sep 29 14:19:24 PDT 2013


On 09/29/2013 10:25 PM, Martin Drasar wrote:
> Hi,
>
> I have upgraded to dmd 2.063.2 and have some troubles making my custom
> bidirectional range work (it used to). In fact, even this code fails on
> assert and I am not really sure why...
>...
> I get this when trying to compile:
>
>> drasar at uriel:/tmp$ dmd test.d
>> test.d(26): Error: static assert  (is(pure nothrow @safe MyRange!(string)() == MyRange!(string))) is false
>
> Do you have an idea?
>
> Thanks,
> Martin
>

Mark 'save' with @property and it will work.


More information about the Digitalmars-d-learn mailing list