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++/20669] New: Template candidates not listed in error message.


When compiling the following (incorrect) code:  
 
------------------------------<test.cc>-------------------------------- 
// Wolfgang Wieser, 03/2005 
 
class A 
{ 
 template<typename T1>void B(int,T1) {} 
 void B(int,int) {} 
}; 
 
void foo() 
{ 
 A a; 
 a.B(1,2,3); 
} 
------------------------------------------------------------------- 
 
GCC (gcc (GCC) 4.1.0 20050312 (experimental)) will write the following error:  
 
------------------------------------------------------------------- 
// test.cc: In function 'void foo()': 
// test.cc:12: error: no matching function for call to 'A::B(int, int, int)' 
// test.cc:6: note: candidates are: void A::B(int, int) 
------------------------------------------------------------------- 
 
Everything is fine except that the template<T1> version of B() is not  
listed among the candidates.  
 
I think it's not a feature but a (low-prio) bug (?)

-- 
           Summary: Template candidates not listed in error message.
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: wwieser at gmx dot de
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-linux-gnu
  GCC host triplet: i686-linux-gnu
GCC target triplet: i686-linux-gnu


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


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