|
Boost : |
From: Paul A Bristow (pbristow_at_[hidden])
Date: 2006-05-15 05:47:31
Jeff Garland proposed a solution the problem of serialization of NaN and
infinity which had beed discussed
http://article.gmane.org/gmane.comp.lib.boost.devel/141006/match=langer+nan
Although this is probably the right expendient solution which could be done
now (if anyone has the time and skill - SoC?), I also feel this is a general
problem that needs a Standard solution (some impect on lexical_cast) so I
have drafted a proposal for TR2 which is attached for comment.
Briefly, it is a KISS solution.
All infinities are output (and input) as one string like "Inf",
And all the various NaNs are also a single string "NaN",
And on input you get the numeric_limits<FPtype>::quiet_NaN() or infinity(),
Is the same for ALL FP types (including UDTs) and layouts.
Paul
--- Paul A Bristow Prizet Farmhouse, Kendal, Cumbria UK LA8 8AB +44 1539561830 & SMS, Mobile +44 7714 330204 & SMS
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk