
-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Dmitry Ivankov Sent: 21 January 2007 12:12 To: boost@lists.boost.org 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@hetp.u-net.com --- Paul A Bristow Prizet Farmhouse, Kendal, Cumbria UK LA8 8AB +44 1539561830 & SMS, Mobile +44 7714 330204 & SMS pbristow@hetp.u-net.com