Boost logo

Boost :

From: Paul A Bristow (pbristow_at_[hidden])
Date: 2007-02-05 07:06:11


>-----Original Message-----
>From: boost-bounces_at_[hidden]
>[mailto:boost-bounces_at_[hidden]] On Behalf Of Dmitry Ivankov
>Sent: 21 January 2007 12:12
>To: boost_at_[hidden]
>Subject: Re: [boost] numeric_limits<Abstract> or how to fix 1358600?
>
>Hmm, maybe std::numeric_limits isn't specialized for classes?

>In that case it's possible to use it only for non-classes.
>Looks like that 18.2.1/1 and 18.2.1/4 states that
>numeric_limits is only for fundamental types.
>
>So maybe just fix lexical_cast so that it won't use
>std::numeric_limits for classes?

I think you are misunderstanding 18.2.1/1 (though I admit it is not as clear as it might be in what is permitted and what is
explicitly NOT specialized - complex<T> in 18.2.1.4) - std::numeric_limits is used in practice for all classes, including
user-defined types - but entries are 'blank' (zero) unless specialized.

lexical_cast is expressly designed to take account of whether the User-defined class is specialized, or not.

Paul

---
Paul A Bristow
Prizet Farmhouse, Kendal, Cumbria UK LA8 8AB
+44 1539561830 & SMS, Mobile +44 7714 330204 & SMS
pbristow_at_[hidden]
 
---
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