|
Boost : |
From: Paul A Bristow (pbristow_at_[hidden])
Date: 2006-08-03 08:00:08
| -----Original Message-----
| From: boost-bounces_at_[hidden]
| [mailto:boost-bounces_at_[hidden]] On Behalf Of Johan Råde
| Sent: 03 August 2006 09:54
| To: boost_at_[hidden]
| Subject: Re: [boost] [serialization] facets for non-finite numbers
|
| I have uploaded a new version to the vault.
|
| This version features:
|
| 1. Strict C99 conformance:
| Output is consistent with C99. (In particular,
| negative NaN is
| written as "-nan".
| All representations allowed by C99 are recognized as input.
|
| 2. Optional support for negative 0.
|
| 3. Clean build with VC++ 7.1 at warning level 4.
|
| 4. Improved documentation.
|
| This version is backwards compatible with earlier versions.
|
| The code comes with a test program. I have only run the test
| program on
| VC++ 7.1.
| If you run the test program on any other platform, please report the
| result to me.
| Both good and bad results are of interest.
|
| Many thanks to Paul Bristow, John Maddock and Gennaro Prota
| for valauble comments.
This compiles and run OK on MSVC 8.0 after automatic conversion of the 7.1
vcproject.
No warnings either :-))
But of course, the proof of portability is other endians and layouts etc :-)
I have yet to get my head round predicting if it will work but looks rather
plausible.
The only final requirement for TR1 is to template it to provide
template<class T> bool signbit(T x);
Additions I can see are checks for:
1 If T not specialized then I returning false may be the obvious option.
But John Maddock's prototype real_concept is NOT specialised,
and yet it would be nice if signbit worked with real_concept.
It would also be nice if it worked with
NTL quad_float (also == Darwin long double and doubledouble) and RR types,
and big_integer when we get one.
I will have to think about this.
2 If is_specialized nad is_signed == false, (all unsigned types) then we
must surely return false.
So many thanks to you for your valuable work on this.
Paul
--- Paul A Bristow Prizet Farmhouse, Kendal, Cumbria UK LA8 8AB +44 1539561830 & SMS, Mobile +44 7714 330204 & SMS pbristow_at_[hidden]
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk