Thread overview | |||||
---|---|---|---|---|---|
|
April 24, 2012 Extending std.format.formattedRead | ||||
---|---|---|---|---|
| ||||
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.
T
--
People walk. Computers run.
|
April 25, 2012 Re: Extending std.format.formattedRead | ||||
---|---|---|---|---|
| ||||
Posted in reply to H. S. Teoh | 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
|
April 25, 2012 Re: Extending std.format.formattedRead | ||||
---|---|---|---|---|
| ||||
Posted in reply to H. S. Teoh | H. S. Teoh:
> 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.
Maybe do you want to open this discussion in the main D
newsgroup? I think this is not a very important issue, but it's a
nice thing to have.
Bye,
bearophile
|
Copyright © 1999-2021 by the D Language Foundation