Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-04-15 23:42:09


----- Original Message -----
From: "Douglas Gregor" <gregod_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Monday, April 15, 2002 11:04 PM
Subject: Re: [boost] Boost.Function and old SGI compilers

> On Monday 15 April 2002 09:58 pm, you wrote:
> > ----- Original Message -----
> > From: "Douglas Gregor" <gregod_at_[hidden]>
> >
> > > The only version of the MIPSpro compiler I've been able to test
> > > Boost.Function on is 7.3.0. From the error message it appears that
the
> > > compiler doesn't handle integral constant expressions well, which
just
> >
> > about
> >
> > > spells doom for getting Boost.Function to compile :(.
> >
> > If this MIPSpro compiler uses an older EDG front-end, it may help to
use
> > the facilities of boost/type_traits/ice.hpp. I've been able to get
> > Boost.Python v2 to work with a very old KCC for one of my clients
this
> > way.
> >
> > -Dave
>
> Unfortunately, this is the rest of the context for the error message:
>
> template <typename T>
> struct is_arithmetic
> {
> BOOST_STATIC_CONSTANT(bool, value =
> (::boost::type_traits::ice_or<
> ::boost::is_integral<T>::value,
> ::boost::is_float<T>::value
> >::value));
> };
>
> There isn't much more that anyone could do to make that more
portable...

Possibly:

template <typename T>
struct is_arithmetic :
    boost::type_traits::ice_or<
         ::boost::is_integral<T>::value,
         ::boost::is_float<T>::value
>
{}

But it's a shot-in-the-dark.

-Dave


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