This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Strange behavoiur of ostringstream (tested on g++3.3.5/4.0.2)
On Sat, Jan 28, 2006 at 10:22:52AM +0000, Jonathan Wakely wrote:
> > So, dear people, I would appreciate if you clear my possible
> > misconceptions about C++, refer me to the knowledgeable
> > authority able to give final answer on my question, or propose
> > a workaround that is portable and not specific to VC++.
> Have you looked at boost::lexical_cast ?
> http://boost.org/libs/conversion/lexical_cast.htm
Surely, I used it in another project. But it was not concise
enough, as to me. Good for single cases, but too verbose and
redundant for mass output. Anyway, it's just a wrapper over
stringstreams, like my SFORMAT macro. Currently I am working
on migration from printf-like formats to type-safe
conversions provided by stringstreams, and I would like to keep
our formatting expressions as concise with stringstreams as they
were with printf-formats. And so, in creating this macro, I
stumbled on this behaviour and decided to ask about it in MS
newsgroups as well as in this maillist. May be my question is
related to library developers, may be to compiler developers,
now I don't know exactly, so I am trying to find a right person
to contact.