This is a discussion on gcc 3.4.3 : too few template-parameters list - Linux ; Hi, Just want your tips regarding one issue, i tried the following code on gcc 3.2 and it works fine. but on gcc 3.4.3. it gives me error like : error: too few template-parameter-lists when i try to compile the ...
Hi,
Just want your tips regarding one issue, i tried the following code on
gcc 3.2 and it works fine. but on gcc 3.4.3. it gives me error like :
error: too few template-parameter-lists when i try to compile the
following lines.
The diff. is template<> keyword is getting added before union __vp {
.....} , I tried to google for the same
come found : http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26355
If you have any idea about the same error, will you tell me in which
gcc stantdard file should i look into for this error.
like:
/usr/lib/gcc/i386-redhat-linux/3.4.3/../../../../include/c++/3.4.3/istream:118:
error: too few template-parameter-lists
/************************************************** ****************************************/
#"test2.cxx"
template < class K > struct hash
{
int foo;
};
template<> struct hash< void *> {
template<> union __vp {
int s;
void *p;
}
;
__vp foo;
}
;
$ gcc -o test2.o test2.cxx
test2.imp:14: error: invalid explicit specialization before '>' token
test2.imp:14: error: explicit specialization in non-namespace scope
`struct hash'
test2.imp:14: error: explicit specialization of non-template
`hash::__vp'
/************************************************** ****************************/