Boost logo

Boost :

From: Paul A Bristow (pbristow_at_[hidden])
Date: 2006-04-20 11:54:31


 

| -----Original Message-----
| From: boost-bounces_at_[hidden]
| [mailto:boost-bounces_at_[hidden]] On Behalf Of Jeff Garland
| Sent: 20 April 2006 15:02
| To: boost_at_[hidden]
| Subject: Re: [boost] Report from Berlin C++ Standards
| Committee meeting
|
| On Thu, 20 Apr 2006 11:04:45 +0100, Paul A Bristow wrote
|
| > | > So some special flag would be needed to hold the Nan or
| Inf nature.
| > | >
| > | > If only there was a Standard representation of Nan and Infs.
| > VERY | > shortsighted, making NaNs and infs hardly useable. | |
| > Agreed. The types in date_time have the ability to
| serialize | and deserilize
| > | NADT (not a date time), -infinity and +infinity. Why
| > | couldn't there be a
| > | simple extension to the numpunct<charT> facet to define an
| > | appropriate output
| > | string? Basically something like:
| > |
| > | //see Langer and Kreft p 414...
| > | template<class charT>
| > | class numpunct : public locale::facet {
| > |
| > | //new functions for nan and infinity
| > | string_type not_a_number_name() const;
| > | string_type infinity_name() const;
| > |
| > | And you'd have to fix num_get as well.
| >
| > Looks a good idea - but these facets look complicated to my
| inexpert
| > eye.
| >
| > Should we ALSO press to get a 'proper' C++0x Standard
| solution to this?
|
| Maybe it isn't clear, these facets already exist (hence the
| ref to L&K p414).
| I'm just suggesting that we write a proposal to add a couple
| methods and them
| modify the 'get'/'put' functions to use them. In fact,
| someone could probably
| write an extended facet to do just this and submit it to Boost if so
| motivated. That, frankly, would be more valuable than the
| change to the standard.

OK - sounds like an excellent project for a student?
Small, self-contained, easily testable..

Paul

-- 
Paul A Bristow
Prizet Farmhouse, Kendal, Cumbria UK LA8 8AB
Phone and SMS text +44 1539 561830, Mobile and SMS text +44 7714 330204
mailto: pbristow_at_[hidden]  http://www.hetp.u-net.com/index.html
http://www.hetp.u-net.com/Paul%20A%20Bristow%20info.html
 

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk