c++/9298: [3.4 regression] [new parser] ICE with function-pointer-type template args
Wolfgang Bangerth
bangerth@ticam.utexas.edu
Wed Jan 15 18:06:00 GMT 2003
> BTW, the code is illegal (there are three bugs):
Of course the code is illegal, but I can really only spot one error :-)
> template<int> static int foo();
> ^^^^^^
Why shouldn't a template not be a static function? It's illegal, though,
to use its address as a template parameter!
> template int CPU::dispatch<&template foo<2> > ();
> ^^ ^^^^^^^^
The one at the left: That's an explicit instantiation, not specialization,
so this is legal syntax. The syntax at the right should be wrong, though
(well, not quite sure, should it?).
W.
-------------------------------------------------------------------------
Wolfgang Bangerth email: bangerth@ticam.utexas.edu
www: http://www.ticam.utexas.edu/~bangerth/
More information about the Gcc-bugs
mailing list