splitter, compilation issue
sigod via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue Oct 27 14:54:29 PDT 2015
On Tuesday, 27 October 2015 at 21:45:10 UTC, Ali Çehreli wrote:
> On 10/27/2015 01:58 PM, sigod wrote:
>> Here's simple code:
>>
>> import std.algorithm;
>> import std.array;
>> import std.file;
>>
>> void main(string[] args)
>> {
>> auto t = args[1].readText()
>> .splitter('\n')
>> .filter!(e => e.length)
>> .split("---")
>> ;
>> }
>>
>> Looks like it should work
>
> split's documentation says that it requires a ForwardRange but
> the output of filter is an InputRange. (I can't imagine now why
> split has that requirement.)
>
> Ali
It still doesn't work.
src\phobos\std\array.d(1562): Error: template
std.algorithm.iteration.splitter cannot deduce function from
argument types !()(Result, string)
Sorry, I should've simplified example more.
More information about the Digitalmars-d-learn
mailing list