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++/13978] New: Koenig lookup doesn't find template functions.


The following code:

namespace ns {
  template <class TP> void func1(TP* t);
  struct A {};
}
 
template < class TP >
void func2() {
   
  func1( new ns::A() );
   
}

gives the error:

koenigmanage2.cc: In function `void func2()':
koenigmanage2.cc:9: error: cannot convert `ns::A*' to `TP*' in argument passing

on 3.4, but works on 3.3 and 3.2.  In other words, Koenig lookup isn't finding
the template function in the associated namespace.  It's my understanding this
should work.

-- 
           Summary: Koenig lookup doesn't find template functions.
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mattyt-bugzilla at tpg dot com dot au
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13978


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