icc V 8.0 Function Template Problem ?

icc V 8.0 Function Template Problem ?

Hi,

icc V 8.0 (icc -ansi -o foo tempfunc.cpp) with -ansi produces
the following error msg:

tempfunc.cpp(34): error: no instance of function template "foofunction" matches the argument list
argument types are: (foo , int )
foofunction(lhs,tag);
^
detected during instantiation of "void assign(foo &far, int) [with T1=double, D1=3U]"

When compiling:

template
class foo {
public:
foo() {}
~foo() {}
};

template
static void foofunction(foo& lhs, int tag)
{ }

template
static void assign(foo& lhs, int tag)
{
foofunction(lhs,tag);
}

int main() {
foo foo1;
assign(foo1,12);
assign(foo1,12);
}

g++ 3.4 has no problem with the code !

Any idea, thanks, Andreas

1 post / 0 new
For more complete information about compiler optimizations, see our Optimization Notice.