What is the D plan's to become a used language?

Vladimir Panteleev via Digitalmars-d digitalmars-d at puremagic.com
Tue Dec 23 14:37:17 PST 2014


On Tuesday, 23 December 2014 at 17:00:55 UTC, Andrei Alexandrescu 
wrote:
> On 12/18/14 4:38 AM, bioinfornatics wrote:
>> - range even the basic io as ByLine which implement range 
>> can't work
>> with std.range.takeOne as is not an Input Range. While a basic 
>> function
>> such as takeOne do not really need to use save method to work 
>> a forward
>> range is enough.
>
> Could you please give an example of this? Thanks. -- Andrei

Unless I'm misunderstanding, it's really as simple as:

auto s = stdin.byLine.takeOne;

C:\...\std\range\package.d(1939): Error: template 
std.range.primitives.save cannot deduce function from argument 
types !()(ByLine!(char, char)), candidates are:
C:\...\std\range\primitives.d(1944):        
std.range.primitives.save(T)(T[] a)
test.d(5): Error: template instance 
std.range.takeOne!(ByLine!(char, char)) error instantiating


More information about the Digitalmars-d mailing list