[Bug c++/34073] overloaded template function resolves differently if one type is included in a namespace

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Mon Nov 12 21:29:00 GMT 2007



------- Comment #3 from pinskia at gcc dot gnu dot org  2007-11-12 21:29 -------
Basically the namelookup for op_is_finite in Element will lookup the previous
declared ones (at definition time) and then will do argument dependent lookup
(at instaintation time).  Argument dependent lookup only looks at definition in
the namespace containing that argument type.  So in the second case the
argument type (AlphabetSet) is in the global namespace so it will see the
function, while in the first case it is located in algebra namespace and there
is no matching function in that namespace.


-- 


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



More information about the Gcc-bugs mailing list