Boost logo

Boost :

Subject: Re: [boost] Is there a macro to test ifstd::numerc_limits<>::max_digits10 is supported by a platform?
From: Paul A. Bristow (pbristow_at_[hidden])
Date: 2012-07-02 14:32:09


> -----Original Message-----
> From: boost-bounces_at_[hidden] [mailto:boost-bounces_at_[hidden]] On Behalf Of Jürgen
> Hunold
> Sent: Saturday, June 16, 2012 11:49 AM
> To: boost_at_[hidden]
> Subject: Re: [boost] Is there a macro to test ifstd::numerc_limits<>::max_digits10 is supported by
a
> platform?
>
> Hi Paul,
>
> On Thursday, 14. June 2012 13:26:20 Paul A. Bristow wrote:
> > > -----Original Message-----
> > > From: boost-bounces_at_[hidden]
> > > [mailto:boost-bounces_at_[hidden]]
> > > On Behalf Of John Maddock
> > >
> > > Try BOOST_NO_NUMERIC_LIMITS_LOWEST as a proxy?
> >
> > OK, but I'm on holiday for a while so I'll wait until I get back
> > before I create more trouble ;-)
> >
> > Anyone trying multiprecision and wanting this feature can patch their
> > \boost-trunk\boost\test\tools\impl.hpp locally.
>
> I've tested BOOST_NO_NUMERIC_LIMITS_LOWEST with gcc-4.6.3 on Linux and this seems to work.
>
> Patch attached.

Thanks - looks good, but I think it might be wise to test how the macro works on a specific test not
actually using Boost.Test before causing a nuisance - as I have discovered to several peoples cost
:-(

The trouble is that Boost.Test is used by all platforms. So it will be disruptive to just patch
like this and hope for the best.

> I'd like to commit it and check the test results for breaks.

> Or is a special macro needed here?

Well perhaps but hopefully not - only a check on all platforms in the testing regime will make sure.

I'll check this out, perhaps using a temporary program attached to Boost.Math testing schedule and
then see what platforms work.

There may still be obscure platforms that are not routinely tested that don't work?

Paul

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