Boost logo

Boost :

From: Doug Gregor (gregod_at_[hidden])
Date: 2001-04-09 21:00:09


On Monday 09 April 2001 10:25, you wrote:
> > and Intel C++ 5.0 (stranger still)
> >
> > C:\PROJECTS\INCLUDE\boost/any_function.hpp(309) : error: non-integral
> > operation not allowed in nontype template argument
> > (count_used_args<T1, T2, T3, T4, T5,
> > T6>::value
>
> +
>
> Update:
>
> Changing this to
>
> static const int args = count_used_args<T1, T2, T3, T4, T5, T6>::value;
> BOOST_STATIC_CONSTANT(int, oneh = one_hundred_if_void_fake<R>::value);
> typedef typename _get_function_obj_invoker<args + oneh>::
>
> fixes the problem. (Likewise in get_function_invoker.)

It appears to be a problem with the older EDG-based compilers, because
MIPSpro 7.3 is broken in the same way. Looks like I'll need more #ifdefs,
because the above fix will likely break Borland C++ (grrr).

> This shows an annoying problem with BOOST_STATIC_CONSTANT:
>
> BOOST_STATIC_CONSTANT(int, args = count_used_args<T1, T2, T3, T4, T5,
> T6>::value)
>
> doesn't work.

        Doug


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