|
Boost : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2001-04-10 05:27:17
From: "Doug Gregor" <gregod_at_[hidden]>
> > 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).
You're right, it does break bcc32. However declaring the constants as enum's
works.
enum { args = count_used_args<T1, T2, T3, T4, T5, T6>::value };
enum { oneh = one_hundred_if_void_fake<R>::value };
Seems like the enum 'hack' is here to stay. [VC 7.0 can handle static
const's.]
-- Peter Dimov Multi Media Ltd.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk