From: Steve M. Robbins (steven.robbins_at_[hidden])
Date: 2002-09-17 09:29:56
On Mon, Sep 16, 2002 at 03:17:27PM -0400, David Abrahams wrote:
> From: "Steve M. Robbins" <steven.robbins_at_[hidden]>
> > Hi,
> > There's a bit of code in there that reads
> > // have to #ifdef here: some compilers don't like the 'N + 1' form
> > // while some other don't like 'value + 1' (Borland)
> > #if !defined(__BORLANDC__)
> > typedef integral_c<T, value + 1> next;
> > typedef integral_c<T, value - 1> prior;
> > #else
> > typedef integral_c<T, N + 1> next;
> > typedef integral_c<T, N - 1> prior;
> > #endif
> > The MIPSpro compiler (version 7.30, using -LANG:std) doesn't like either
> > Is there a third way?
> First try adding parens around (value + 1).
> Then try BOOST_STATIC_CONSTANT(type-of-value, next_val = value + 1), and
> pass next_val to integral_c.
> Let us know what works...
Well, someone (YOU, I think) has beaten me to it: the code currently
in CVS works. For the record, the MIPSpro compiler takes the static
constant version guarded by
#if defined(__EDG_VERSION__) && __EDG_VERSION__ <= 241
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk