This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/51577] dependent name lookup finds operator in global namespace
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 09 Mar 2015 10:11:47 +0000
- Subject: [Bug c++/51577] dependent name lookup finds operator in global namespace
- Auto-submitted: auto-generated
- References: <bug-51577-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51577
--- Comment #11 from Jonathan Wakely <redi at gcc dot gnu.org> ---
And the testcase from PR 61161:
struct T {
template<typename T> void f(const T &v) {
0 << v;
}
};
namespace N {
struct X {};
struct Y : X {};
void operator<<(int, const X&) {}
}
void operator<<(int, const N::Y&) = delete;
int main() {
N::Y d;
T().f(d);
}