Boost logo

Boost :

From: Edward Diener (eddielee_at_[hidden])
Date: 2003-03-22 17:38:07


The help gives:

"
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.
Maybe Mr. Gurtovoy can shed some light.

Jaap Suter wrote:
> Hi,
>
> Since I started using the latest version of the MPL, the one that
> shipped with 1.30.0, I've been getting the following error a lot:
>
> e:\library\boost\boost\mpl\aux_\integral_wrapper.hpp(78) : fatal
> error C1202: recursive type or function dependency context too complex
>
> I'm using MSVC 7.0.
>
> It's really to find out what is causing it, because it only happens in
> really deep and complex compile-time calculations. I wasn't getting
> them before, and Intel and GCC work fine as well.
> I understand this message is probably too vague, but any help or
> advice
> would be greatly appreciated.
>
> Regards,
>
> Jaap Suter
>
>
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost


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