Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 51483

Summary: [Templates] template members & virtual base class functions
Product: [Tools] CDT Reporter: Andrew Niefer <aniefer>
Component: cdt-parserAssignee: Project Inbox <cdt-core-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: rolando.martins, yevshif, zeratul976
Version: 2.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Andrew Niefer CLA 2004-02-10 11:51:09 EST
Spec 14.5.2-4
A specialization of a member function template does not override a virtual 
function from a base class

class B {
   virtual void f( int );
};

class D : public B{
   template < class T > void f( T );  //does not override B::f(int)
};
Comment 1 Andrew Niefer CLA 2005-04-22 15:04:08 EDT
void foo () {
   D *d;
   d->f( 1 );   //calls B::f(int) not  D::f<int>
}
Comment 2 Doug Schaefer CLA 2007-08-21 10:55:53 EDT
Future means you commit to fix it in the Future. Inboxes can't make committments. Moving to '--'.
Comment 3 Nathan Ridge CLA 2013-12-15 21:25:43 EST
Tested this with CDT master:

  - 'Open Declaration' on the call to f() in foo() takes you to D::f()
  - 'Find References' on D::f() brings up the call to f() in foo()
  - 'Find References' on B::f() brings up no results

I think this report can be closed.
Comment 4 Nathan Ridge CLA 2016-12-27 22:43:45 EST
Closing per comment 3.