
On Wed, Feb 18, 2009 at 13:02, Stewart, Robert <Robert.Stewart@sig.com> wrote:
lexical_cast is used for many type-to-type conversions, not just with strings. Why would this be any different?
Do you have some examples of uses where neither source nor target is string-like? I can't come up with any and there are no such examples in the documentation. (I understand that it's possible, but haven't seen where it's useful.) Looking at the lexical_cast documentation brought up an interesting point, actually. The FAQ[1] mentions that lexical_cast<std::string>(uint8_t(32)) doesn't do what people first expect, which may be a point in favour of separating the different kinds of casts. [1] http://www.boost.org/doc/libs/1_38_0/libs/conversion/lexical_cast.htm#faq