Bug 17321 – Example code for std.stdio.File fails to compile

Status
RESOLVED
Resolution
INVALID
Severity
regression
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2017-04-13T07:48:00Z
Last change time
2017-04-18T09:39:07Z
Assigned to
nobody
Creator
bugzilla

Comments

Comment #0 by bugzilla — 2017-04-13T07:48:46Z
http://dlang.org/phobos/std_stdio.html#.File.readf The example code is: void main() { import std.stdio; auto f = File("input"); foreach (_; 0 .. 3) { int a; f.readf!" %d"(a); writeln(++a); } } and does not compile: test.d(8): Error: template instance std.stdio.File.readf!" %d" does not match template declaration readf(Data...)(in char[] format, Data data) if (allSatisfy!(isPointer, Data))
Comment #1 by bugzilla — 2017-04-13T08:13:27Z
This seems to be an issue with my local copy of std.stdio seems to be behind the master.
Comment #2 by bugzilla — 2017-04-18T09:39:07Z
I'm going to abandon this.