Bug 71827

Summary: [Templates] Wrong type for "this" in template member functions
Product: [Tools] CDT Reporter: Andrew Niefer <aniefer>
Component: cdt-parserAssignee: Andrew Niefer <aniefer>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: devinsteffler.lists, victor.lenet
Version: 2.0   
Target Milestone: Future   
Hardware: PC   
OS: Windows 2000   
Whiteboard:
Bug Depends on: 71884    
Bug Blocks:    

Description Andrew Niefer CLA 2004-08-11 16:03:08 EDT
I think that we are giving the this pointer in template member functions the 
wrong type.Currently we are giving it the type of a pointer to the containg 
class, however, if the containing class is a template class, I think we should 
give it the type of an instantiation of the containing class.  The arguments 
used to instantiate the class would be the same as for spec 14.6.1-1.
(See TemplateEngine.instantiateWithinTemplateScope())

The default copy constructor also has this problem.

I've not yet seen any problems that may be caused by us doing this wrong.  My 
initial attempt to fix this caused more problems.
Comment 1 Andrew Niefer CLA 2004-09-30 10:39:18 EDT
*** Bug 74204 has been marked as a duplicate of this bug. ***
Comment 2 Andrew Niefer CLA 2004-09-30 10:40:12 EDT
See example in 74204 and make sure it works
Comment 3 Andrew Niefer CLA 2005-05-10 13:31:14 EDT
done