can't take address of static template member funcion?
Corey Kosak
kosak@cs.cmu.edu
Sat May 23 14:47:00 GMT 1998
I *think* this is legal C++, but neither egcs 1.0.3 nor gcc 2.8.1 appear to
like it.
> g++ --version bug.cc ; g++ bug.cc || cat bug.cc
egcs-2.90.29 980515 (egcs-1.0.3 release)
bug.cc:14: sorry, not implemented: `template_id_expr' not supported by dump_decl
bug.cc: In function `int main()':
bug.cc:14: `class cow' has no member named `'
#include <stdio.h>
class cow {
public:
template <class T>
static void func() {
printf("hi!\n");
}
};
int main()
{
cow().template func<int>(); // OK
void (*fp)()=&cow().template func<int>; // error
return 0;
}
More information about the Gcc-bugs
mailing list