Bug 71827 - [Templates] Wrong type for "this" in template member functions
Summary: [Templates] Wrong type for "this" in template member 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: Future   Edit
Assignee: Andrew Niefer CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 74204 (view as bug list)
Depends on: 71884
Blocks:
  Show dependency tree
 
Reported: 2004-08-11 16:03 EDT by Andrew Niefer CLA
Modified: 2005-05-10 13:31 EDT (History)
2 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-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