This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/50033] New: Failing ADL for template-id function call
- From: "kristian.spangsege at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 09 Aug 2011 19:40:52 +0000
- Subject: [Bug c++/50033] New: Failing ADL for template-id function call
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50033
Bug #: 50033
Summary: Failing ADL for template-id function call
Classification: Unclassified
Product: gcc
Version: 4.4.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: kristian.spangsege@gmail.com
Unexpected failure to compile the following sample:
namespace N
{
struct A {};
template<class B> void func(A const &, B const &) {}
}
int main()
{
N::A a;
func(a, 7);
func<int>(a, 7);
return 0;
}
The first call to func() without the template argument works fine.
The second one fails because 'func' cannot be found.
Is this really in agreement with the standard, or is it a bug in GCC?
I saw this with GCC version 4.4.3.
Regards,
Kristian Spangsege