Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 51483 - [Templates] template members & virtual base class functions
Summary: [Templates] template members & virtual base class functions
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-parser (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-10 11:51 EST by Andrew Niefer CLA
Modified: 2016-12-27 22:43 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.