This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/50033] New: Failing ADL for template-id function call


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]