Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7956 Discussions

icc V 8.0 Function Template Problem ?

Anonymous89
Beginner
181 Views
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
0 Kudos
0 Replies
Reply