$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Edward Diener (eldiener_at_[hidden])
Date: 2007-05-07 13:48:19
Sebastian Redl wrote:
> Paul A Bristow wrote:
>> I also recollect that I never understood why
>>
>> zz = lexical_cast<int>("0xffff"); // Fails!
>>
>> However I was more concerned about the floating-point problems, now sorted out,
>> and I didn't waste any brain activity on it.
>>
> That's because all lexical cast does is create a string stream and use
> the extractor to get the value out. The int extractor doesn't parse code
> style integers. It just looks at the base flag (oct, dec or hex) and
> expects the number to be in this format.
My understanding is that if the istringstream sees a string starting
with Ox or 0X it should automatically parse it as a hexadecimal value.