------- Comment #2 from bangerth at dealii dot org 2006-10-24 02:21 ------- I'm not completely sure who's right and wrong, but here's what's happening: the second argument in the X case is an integer (the number zero), not an int*. Consequently, the first template is not an exact match, but requires a cast. Gcc then takes the second template with the ellipsis instead and produces the output ----------------- hasn't Z::T hasn't Z::T ----------------- with all versions I have here (2.95...4.2pre). If you change the last argument to (int*)0, then you get what you probably expect.
For the record, I also get this here: ------------- g/x> icc -Xc -ansi x.cc g/x> ./a.out has Z::T hasn't Z::T ------------- W. -- bangerth at dealii dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bangerth at dealii dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29577