On Sunday, 11 January 2015 at 23:50:18 UTC, Ali Çehreli wrote:
On 01/11/2015 12:25 PM, Zaher Dirkey wrote:
> reproduce example here
> http://dpaste.dzfl.pl/13fb453d0b1e
That link doesn't work for me. (?)
Does opApply return the delegate's return value ('b' below)?
It must return object, but it is in template
i added ref, or witout ref, same
this the part of opApply
int opApply(int delegate(ref T) callback)
{
int result = 0;
for (int i = 0; i < _items.length; ++i)
{
result = callback(_items[i]);
if (result == 0)
break;
}
return result;
}
this part code here
https://github.com/parmaja/sard/blob/master/src/sard/classes.d
and reproduced (but works fine) here
https://github.com/zaher/d_test/blob/master/foreach.d