Input Range addition to associative arrays
Ali Çehreli
acehreli at yahoo.com
Fri Dec 7 11:51:28 PST 2012
On 12/07/2012 07:40 AM, Phil Lavoie wrote:
> I tested your code and it seems to work correctly.
As bearophile also pointed out, it is based on an assumption that may be
incorrect on obscure system ;) but it is trivial to fix. One way is by
storing the original aa and doing a lookup of the value:
ElementType front() /* const */ @property
{
return ElementType(keys.front, aa[keys.front]);
}
> However, what I find
> troubling is that I would never have thought of trying this out. This is
> because those two properties are said to return DELEGATES, according to
> this page: http://dlang.org/hash-map.html
That is a documentation bug. Please improve it by either using the
"Improve this page" button on that page or by filing a bug report at
http://d.puremagic.com/issues/enter_bug.cgi
Thank you,
Ali
More information about the Digitalmars-d
mailing list