From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-09-28 08:51:35
Maxim Yegorushkin wrote:
> Vladimir Prus <ghost_at_[hidden]> wrote:
>> Maxim Yegorushkin wrote:
>>> In generic code lexical_cast<> is sometimes used as a cast to the same
>>> type. I would like to shortcut this rather then going all the way by
>>> writing it to a stream and reading back.
>> Do you mean you sometimes use lexical_cast to cast between two types,
>> neither of which is std::string?
> Rather both of them are. Do you still need an example?
No. But in that case, I'm not sure it's good to use disable_if. According to
tests, lexical_cast is much more portable than enable_if/disable_if and you
don't need the generic lexical_cast<T>(T) case, only the string case.
I really wonder if somebody ever used lexical cast to convert between two
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk