|
Boost Users : |
From: alefor_at_[hidden]
Date: 2006-06-14 13:47:59
Hi,
I'm parsing with Spirit strings of numeric values and want to guess the
right POD that can fit all of them.
For example, I see at glance sets with only 0.0 and 1.0, that can be
optimized to a adjacent group of bool: 1. Or some doubles, in another
set, which value ranges and resolution like shorts. Or if something like
"0.000000000000000000000001" will fit exactly in my floats.
I'm reading boost/lexical_cast , numeric/conversion and interval docs,
but still don't found a way to convert strings to POD knowing if that
cast is exact or not. Range check is there, but don't find a test
telling me if that cast was exact. The 'exact' term here is what
boost::numeric doc definitions chapter means.
Thanks,
alef
-- Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net