------- 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