← Back to index
|
Original Bugzilla link
Bug 4922 – readf doesn't work with char, wchar and dchar
Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
x86
OS
All
Creation time
2010-09-23T11:28:00Z
Last change time
2011-01-21T22:36:51Z
Assigned to
andrei
Creator
canalpayciftci
Comments
Comment #0
by canalpayciftci — 2010-09-23T11:28:15Z
Code: import std.stdio; void main() { char a; wchar b; dchar c; readf("%s %s %s", &a,&b,&c); } Error : dmd -w -c "isimsiz.d" (C:\Program Files\Geany ) C:\D\dmd2\windows\bin\..\..\src\phobos\std\format.d(441): Error: template std.format.unformatValue(T,Range,Char) if (isArray!(T) && !isSomeString!(T)) does not match any function template declaration C:\D\dmd2\windows\bin\..\..\src\phobos\std\format.d(441): Error: template std.format.unformatValue(T,Range,Char) if (isArray!(T) && !isSomeString!(T)) cannot deduce template function from argument types !(char)(LockingTextReader,FormatSpec!(char)) C:\D\dmd2\windows\bin\..\..\src\phobos\std\format.d(441): Error: template instance errors instantiating template Please note that this works: int i; readf("%s", &i);
Comment #1
by andrei — 2011-01-21T22:36:51Z
http://www.dsource.org/projects/phobos/changeset/2359