This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/70099] New: Function found by ADL, but shouldn't be visible at point of definition
- From: "barry.revzin at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 05 Mar 2016 19:59:51 +0000
- Subject: [Bug c++/70099] New: Function found by ADL, but shouldn't be visible at point of definition
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70099
Bug ID: 70099
Summary: Function found by ADL, but shouldn't be visible at
point of definition
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
The following fragment compiles on g++ 5.3.0:
struct X { };
namespace foo {
template <class T>
void bar() { T{} < T{}; }
void operator<(const X&, const X&) {}
}
int main() {
foo::bar<X>();
}
But foo::operator<(const X&, const X&) isn't visible at the point of the
definition of bar, and isn't in one of the associated namespaces of X, per
[temp.dep.res].