|
Boost : |
From: Alexander Nasonov (alnsn_at_[hidden])
Date: 2007-05-07 12:16:24
Dean Michael Berris wrote:
> Hi Everyone,
>
> I've recently tried the following (inlined test) which isolates the
> problem I've encountered with boost::lexical_cast<int8_t>:
Run this and enter 127
int main(int argc, char * argv[]) {
int8_t value;
if(std::cin >> value)
{
std::cout << '\n' << value << "\ngood\n";
}
}
On FreeBSD 6.2, gcc 3.4, I get this
> ./a.out
127
1
good
It reads only '1', as if int8_t were char.
-- Alexander Nasonov http://nasonov.blogspot.com Being is desirable because it is identical with Beauty, and Beauty is loved because it is Being. We ourselves possess Beauty when we are true to our own being; ugliness is in going over to another order; knowing ourselves, we are beautiful; in self-ignorance, we are ugly. -- Ambrose Bierce -- This quote is generated by: /usr/pkg/bin/curl -L http://tinyurl.com/veusy \ | 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 acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk