F
frankg
When I compile this file
------------------------------------------------------
#include <stdarg.h>
template <class Any>
void var_arg_func(int dimension_count, ...)
{
int dimensions[4];
va_list ap;
va_start(ap, dimension_count); // <- error
for (int i = 0; i < 3; i++)
{
dimensions = va_arg(ap,int); // <- error
}
}
------------------------------------------------------
I get the following obscure error message:
test.cpp:10: sorry, not implemented: initializer contains unrecognized
tree code
test.cpp:15: sorry, not implemented: initializer contains unrecognized
tree code
If I make the function to be non-templated, it compiles.
Either version compiles under MSVC++ 6.0.
I am using the gcc 2.7.2 that ships with Tornado 2.0 from
WindRiver.
Can anyone explain this error message?
I need to get this code to compile.
I have a templated class that I wrote that implements a
multi-dimensional container. Since it is a container it must be
templated.
Being multi-dimensional the functions that require an index use
the elipsis ... operator.
------------------------------------------------------
#include <stdarg.h>
template <class Any>
void var_arg_func(int dimension_count, ...)
{
int dimensions[4];
va_list ap;
va_start(ap, dimension_count); // <- error
for (int i = 0; i < 3; i++)
{
dimensions = va_arg(ap,int); // <- error
}
}
------------------------------------------------------
I get the following obscure error message:
test.cpp:10: sorry, not implemented: initializer contains unrecognized
tree code
test.cpp:15: sorry, not implemented: initializer contains unrecognized
tree code
If I make the function to be non-templated, it compiles.
Either version compiles under MSVC++ 6.0.
I am using the gcc 2.7.2 that ships with Tornado 2.0 from
WindRiver.
Can anyone explain this error message?
I need to get this code to compile.
I have a templated class that I wrote that implements a
multi-dimensional container. Since it is a container it must be
templated.
Being multi-dimensional the functions that require an index use
the elipsis ... operator.