Boost logo

Boost :

From: Alexander Nasonov (alnsn_at_[hidden])
Date: 2007-05-16 15:25:28

Phil Endecott wrote:
> ...
> Q: What does lexical_cast<string> of an int8_t or uint8_t not do what I expect?
> A: As above, note that int8_t and uint8_t are actually chars and are
> formatted as such. To avoid this, cast to an integer type first: lexical_cast<string>(static_cast<int>(n)).

Actually, you can write it a bit shorter: lexical_cast<string>(+n) ;-)

New revision is available at

Alexander Nasonov
The greater our knowledge increases the more our ignorance unfolds.
-- John F. Kennedy --
This quote is generated by: 
	/usr/pkg/bin/curl -L         \
	  | sed -e 's/^document\.write(.//' -e 's/.);$/ --/'  \
	        -e 's/<[^>]*>//g' -e 's/^More quotes from //' \
	  | fmt | tee ~/.signature-quote

Boost list run by bdawes at, gregod at, cpdaniel at, john at