
24 Nov
2011
24 Nov
'11
6:16 p.m.
2011/11/24 GMan <gmannickg@gmail.com>:
In my mind, lexical_cast is a nicer/safer/optimized version of a std::stringstream cast. That is, in the case of no errors lexical_cast<R>(x) has the same result as:
template <typename S> R lexical_cast_exposition(const S& x) // assumes no errors { std::stringstream ss; ss << x;
R y; ss >> y;
return y; }
In my case, S is void* and R is std::string (and it uses ostream& operator<<(const void*)).
Great thanks for reporting this bug. Ticket is already crated(#6132) I`ll try to fix it till next release. Best regards, Antony Polukhin