Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Error message: 1540-0701 (S) The limit on nested template instantiations has been exceeded

0 views
Skip to first unread message

Alex Vinokur

unread,
Jun 22, 2009, 2:09:48 AM6/22/09
to
> uname -a
AIX ilibm016 3 5 0004F43AD400

> /usr/vacpp/bin/xlC_r -qversion
IBM XL C/C++ Enterprise Edition V8.0 for AIX
Version: 08.00.0000.0000

Here is some program

--- prog.cpp ---
template <int N>
int foo()
{
return (foo<N-1>() + 2);
}

template <>
int foo<0>()
{
return 0;
}

int main()
{
int value = foo<300>();
return value;
}

----------------


Compilation:

> /usr/vacpp/bin/xlC_r -q64 -qwarn64 prog.cpp
"prog.cpp", line 2.5: 1540-0701 (S) The limit on nested template
instantiations
has been exceeded while instantiating "int
foo<250>()".

============================

Question-1. Is there any compilation option or pragma that enables the
user
to increase the template-related recursion deep/limit?

Question-2. Does any xlC's description contains the exact value of
that limit?


Thanks.

Alex Vinokur

0 new messages