Eager dirEntries

Andrej Mitrovic andrej.mitrovich at gmail.com
Mon Mar 21 16:45:30 PDT 2011


On 3/22/11, bearophile <bearophileHUGS at lycos.com> wrote:
> Andrej Mitrovic:
>
>> this won't compile:
>>
>> string[] entries = array(dirEntries(directory, SpanMode.shallow));
>
> Do you know why?
>
> Bye,
> bearophile
>

build.d(164): Error: template std.array.array(Range) if
(isIterable!(Range) && !isNarrowString!(Range)) does not match any
function template declaration
build.d(164): Error: template std.array.array(Range) if
(isIterable!(Range) && !isNarrowString!(Range)) cannot deduce template
function from argument types !()(DirIterator)

I'm not sure why array() has this signature. Perhaps it needs an
update and let any iterable range through?


More information about the Digitalmars-d-learn mailing list