appender!(string[]).put(string) doesn't work
David Held via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Feb 8 16:09:59 PST 2015
auto data = appender!(string[]);
...
data.put(someString);
source\colony.d(360): Error: template
std.array.Appender(string[]).Appender.put does not match any function
template declaration. Candidates are:
D:\D\dmd2\windows\bin\..\..\src\phobos\std\array.d(2251):
std.array.Appender!(string[]).Appender.put(U)(U item) if (canPutItem!U)
D:\D\dmd2\windows\bin\..\..\src\phobos\std\array.d(2279):
std.array.Appender!(string[]).Appender.put(Range)(Range items) if
(canPutConstRange!Range)
D:\D\dmd2\windows\bin\..\..\src\phobos\std\array.d(2288):
std.array.Appender!(string[]).Appender.put(Range)(Range items) if
(canPutRange!Range)
source\colony.d(360): Error: template
std.array.Appender!(string[]).Appender.put(U)(U item) if (canPutItem!U)
cannot deduce template function from argument types !()(char[])
The example in the documentation implies that this should work fine.
What am I missing?
Dave
More information about the Digitalmars-d-learn
mailing list