Boost logo

Boost :

Subject: Re: [boost] [lexical_cast] Locale used during conversion
From: Paul A. Bristow (pbristow_at_[hidden])
Date: 2009-06-04 10:27:41


> -----Original Message-----
> From: boost-bounces_at_[hidden] [mailto:boost-bounces_at_[hidden]]
On
> Behalf Of Adam Badura
> Sent: 30 May 2009 17:44
> To: boost_at_[hidden]
> Subject: Re: [boost] [lexical_cast] Locale used during conversion
>
> changes I proposed are quite
> simple requiring little work. As a proof of that I attach lexical_cast.hpp
changed to
> cover what I proposed.
> I have added classic_lexical_cast which uses std::locale::classic()
during the
> casting. Both version propagate std::locale object to be used. If
traditional version is
> used a NULL pointer is propagated so nothing actually changes and overhead
should
> be marginal.
> Adding a cat (or other function) which takes arbitrary object should
be easy with
> this code however I have not done it since I don't need it.
>
> What do you think about those changes? Can they be included in Boost
1.40?

At a glance this all seems reasonable and useful, but I am sure everyone is
concerned at the risk of causing collateral damage - because lexical_cast is
so very, very widely used.

Can anyone wanting the new features volunteer to try out your version?

I'd like to see some other reports of successful use of this, not
necessarily to test the locale features.

Would it be wise to do this before unleashing it on trunk to make that it
don't cause trouble in the nightly tests?

Paul

---
Paul A. Bristow
Prizet Farmhouse
Kendal, UK   LA8 8AB
+44 1539 561830, mobile +44 7714330204
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