http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51083
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Component|c++ |libstdc++ Ever Confirmed|0 |1 --- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-11-10 19:00:18 UTC --- N.B. the reason std::imag() is in the overload set is because cx_mat is Mat<std::complex<double>> so namespace std is an associated namespace during name lookup for "imag" The problem isn't to do with overloads in different namespaces, I think it's just that std::imag() in <complex> is too greedy and matches anything