Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2003-03-22 21:21:24

"Edward Diener" <eddielee_at_[hidden]> writes:

> "
> recursive type or function dependency context too complex
> A template definition was recursive or exceeded complexity limits. For
> example:
> template<int n> class Factorial : public Factorial<n-1>
> {
> public:
> operator int ()
> {
> return Factorial <n-1>::operator int () * n;
> }
> };
> Factorial<7> facSeven; // error on this line"
> In the example above there is no specialization for Factorial<0>, which is
> why it is endlessly recursive. I have no idea what MS really means by
> "function dependency context too complex" except as a way of saying that
> their compiler has some limit regarding template definitions which has been
> overstepped.
> I have no idea why "operator AUX_WRAPPER_VALUE_TYPE() const { return
> this->value; }" would cause this, but perhaps it is some other construct.

It could be an instantiation depth issue. Maybe the OP's code needs
more of our loop unrolling technique to avoid deep instantiations. I
think that can be controlled by #defining BOOST_MPL_UNROLLING_LIMIT
to some number greater than 4 before mpl files are #included.


Dave Abrahams
Boost Consulting

Boost list run by bdawes at, gregod at, cpdaniel at, john at