------- Comment #4 from redi at gcc dot gnu dot org  2009-12-08 21:58 -------
In resolving dependent names, names from the following sources are considered:
— Declarations that are visible at the point of definition of the
template.
— Declarations from namespaces associated with the types of the function
arguments both from the instantiation context (14.7.4.1) and from the
definition context.

— If T is a fundamental type, its associated sets of namespaces and classes are
both empty.
— If T is a pointer to U or an array of U, its associated namespaces and
classes are those associated with U.

void* is a pointer to fundamental type so has no associated namespaces, so only
the first source is considered, and only f(T*) is visible at the point of
definition. This is invalid.


-- 

redi at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34886

Reply via email to