> Sample program: > > import std.typecons; > > typedef uint oid_t; > > void main() { > Tuple!(uint,uint) key; > // Tuple!(oid_t,oid_t) key; // Doesn't work > } > > If I use the last tuple instead of the first, I get the following > compiler error with DMD 2.052 in OS X: > > /path/to/src/phobos/std/format.d(1579): Error: function > std.format.formatValue!(Appender!(string),oid_t,immutable(char)).formatValu > e is deprecated > /path/to/src/phobos/std/format.d(306): Error: template instance > std.format.formatGeneric!(Appender!(string),oid_t,immutable(char)) > error instantiating > /path/to/src/phobos/std/typecons.d(507): instantiated from here: > formattedWrite!(Appender!(string),immutable(char),oid_t) > > It seems that std.typecons is using a deprecated formatting API, which > is triggered by my use of a custom type? And ... I guess this would be > a bug? (I looked in the tracker, and couldn't find it there already.)
I would point out that typedef is going to be removed from the language. You should be using alias instead. I don't know if this wil lhave any effect on the bug you're seeing though (probably, since alias doesn't actually produce a new type - just an alias for the old one). - Jonathan M Davis