For convenience, std.string should provide toString overloads that accept char[], const(char)[], and Object. Currently, for generic template code, you have to do the following: --- import std.string; alias std.string.toString toString; string toString(Object o) { return (o ? o.toString : "null"); } string toString(string s) { return s; } template (T) { T t; // ... toString(t); } ---
std.conv has settled this a while ago.