
Joh Maddock tells me you are concerned that the maxdigits_10 magic formula doesn't work with base other than 2. This is obviously entirely true, but decimal based C++ as rare as hens teeth? So it is seems hardly worth an extra test of numeric_limits<>::radix in every invocation of lexical_cast that I fear cannot be optimised away until C++0X hits the streets (and can be relied upon in every compiler). (Unless if can be done with a macro - but then there is a problem with it being standard). So I'd leave a comment, and put the problem in the 'too difficult' drawer for now? Thanks for your work on this nonetheless. Paul --- Paul A Bristow Prizet Farmhouse, Kendal, Cumbria UK LA8 8AB +44 1539561830 & SMS, Mobile +44 7714 330204 & SMS pbristow@hetp.u-net.com | -----Original Message----- | From: boost-bounces@lists.boost.org | [mailto:boost-bounces@lists.boost.org] On Behalf Of Gennaro Prota | Sent: 04 August 2006 18:40 | To: boost@lists.boost.org | Subject: Re: [boost] Spurious warning in lexical_cast.hpp | | On Fri, 4 Aug 2006 14:33:30 +0100, "Paul A Bristow" | <pbristow@hetp.u-net.com> wrote: | | >IMO, it does NOT require IEEE754 - it only requires | >numeric_limits<T>::digits to be correct for that type T. | > | >So, it works for NTL quad_float which is NOT IEEE754. | | That's what I was wishing to hear :-) | | >| As to the docs, this is what I would add. Feedback welcome. | >| | >| lexical_cast<> offers the following guarantees: [...] | >| | >Well in principle yes, but the C++ Standard is not clear if | the second is | >REQUIRED, or is just a Good Quality Implementation. | | Hmm... what about "lexical_cast<> requires a good quality | implementation"? ;-) Seriously, I'll take some time for writing good | unit tests, so that we can have a clear view of what happens. | | This looks like a very sound addition to me. If it proves so in | practice I guess Beman can add it to the standard proposal. | | -- | [ Gennaro Prota, C++ developer for hire ] | | _______________________________________________ | Unsubscribe & other changes: | http://lists.boost.org/mailman/listinfo.cgi/boost |