Victor said:
You made me think a bit (tsk-tsk).
[basic.link]/2, last bullet item.
[temp.arg.type]/2.
I've looked at these references, and I agree with the fact that the
static member function should have no linkage. I could not for
certain decide whether function pointers where treated differently (In
fact, I also think it should fail).
Pointers to local class members <int X::*f> certainly does not work
for
exactly the reason you've mentioned. Perhaps it works because the
argument is deduced by the function template (14.8.8), although,
attempting to do the same with pointers to member functions fails
with error:
"a template argument may not reference a local type"
I've performed compilations with later version of GCC, Comeau and
the compilers offered at
www.dinkumware.com, all with the same
result. For comeau I've used --strict as option.