
28 Sep
2004
28 Sep
'04
1 p.m.
David Abrahams <dave@boost-consulting.com> wrote:
Alexander Nasonov <alnsn@yandex.ru> writes:
David Abrahams wrote:
I can think of other uses. You might lexical_cast T->T in order to normalize the value somehow.
[]
I can think of UDT that has some non-serialized members and those members you could reset. lexical_cast is not a best tool for this, IMO.
Maybe, maybe not. Sometimes convenience is more important than doing it the best way. It's almost always better to provide uniformity than to have special cases that break because they *might* just be an error.
I would like a cast to do cast only, not normalize. For normalize I would use something named appropriately, so that a reader of my code wouldn't be obfuscated. -- Maxim Yegorushkin