Extending std.format.formattedRead

Kenji Hara k.hara.pg at gmail.com
Tue Apr 24 18:42:25 PDT 2012


On Tuesday, 24 April 2012 at 21:50:03 UTC, H. S. Teoh wrote:
> What's the correct way of implementing formattedRead support for
> user-defined types? I tried overloading the unformatValue() 
> template,
> but for some reason the compiler doesn't seem to be picking it 
> up.

Unfortunately, there is not yet general way.
The definition of unformatValue for user-defined type in 
different module isn't considered by std.format module. D's 
module system is closed in basic.

Kenji Hara


More information about the Digitalmars-d-learn mailing list