This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/36883] New: Overeager ADL again
- From: "dave at boost-consulting dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Jul 2008 19:36:04 -0000
- Subject: [Bug c++/36883] New: Overeager ADL again
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
If I understand correctly, the following should not compile, because normal
lookup is supposed to look backwards from the calling template's
point-of-definition. There's nothing to make foo an associated namespace of
boo::X.
namespace boo
{
struct X {};
}
namespace foo
{
template <class T>
void bar( T x )
{
baz(x); // <== should fail here
}
void baz(boo::X) {}
}
int main()
{
foo::bar( boo::X() );
}
--
Summary: Overeager ADL again
Product: gcc
Version: 4.3.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dave at boost-consulting dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36883