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

Reply via email to