--- Comment #5 from redi at gcc dot gnu dot org 2009-12-08 11:21 ---
'typename X::T*' is a non-deduced context, so should not be involved in
argument deduction, and 0 is a valid null pointer constant
*** This bug has been marked as a duplicate of 23055 ***
--
redi at gcc dot gnu do
--- Comment #4 from bangerth at dealii dot org 2006-11-01 22:57 ---
You don't need a cast when converting to pointer, but the data
type of "0" is still int. When determining the type of a template
parameter, it therefore tries to to make the template parameter 'int'.
--
http://gcc.g
--- Comment #3 from pinskia at gcc dot gnu dot org 2006-10-24 02:30 ---
Oh, I read the bug incorrectly.
As I understand it 0 is special as it is also the NULL pointer and you don't
need a cast for it to assign a pointer to it. Maybe we forget to take that
into account.
--
http://gc
--- 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
requ
--- Comment #1 from pinskia at gcc dot gnu dot org 2006-10-24 00:56 ---
This code compiles for me with 4.2.0 and 4.0.2.
As I understand this, in the Y case the first template overload gets rejected
as X::T does not exist. In the X case, the first template is an exact match so
it matches