* Re: Template template parameter patch
@ 1998-01-16 14:37 Mike Stump
0 siblings, 0 replies; 2+ messages in thread
From: Mike Stump @ 1998-01-16 14:37 UTC (permalink / raw)
To: egcs, lerdsuwa
> Date: Thu, 15 Jan 1998 09:10:00 -0800
> From: Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
> To: egcs@cygnus.com
> I finished an implementation of template template parameter for egcs.
Really cool work! Thanks a ton.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Template template parameter patch
@ 1998-01-16 1:51 Kriang Lerdsuwanakij
0 siblings, 0 replies; 2+ messages in thread
From: Kriang Lerdsuwanakij @ 1998-01-16 1:51 UTC (permalink / raw)
To: egcs
[This is my 3rd attempt to post this mail. Sorry if you receive
duplicate post.]
Hi,
I finished an implementation of template template parameter for egcs.
The patch and ChangeLog is in the file
egcs-971225-ttp980113.patch
at
http://www-scf.usc.edu/~lerdsuwa/util/patch/
The patch is against egcs-971225. It passes the regression test. Only
2 new test cases (ttp22.C and ttp23.C) fails. I will post a fix to
these 2 cases as a separate patch since it has nothing to do with
template template parameter - template name D being introduced in
derived class scope as D<int>.
Implementataion details:
The design involves a new TEMPLATE_TEMPLATE_PARM node. It is similar to
TEMPLATE_TYPE_PARM except that its TYPE_NAME is a TEMPLATE_DECL and its
template arguments, if present, are kept inside the
CLASSTYPE_TEMPLATE_INFO field.
In template argument substitution, a TEMPLATE_TEMPLATE_PARM with
template arguments (which appears as a type like TT<int> where TT is a
template parameter) is turned into a RECORD_TYPE while the one without
template arguments (one that is part of template signature like int
f<TT>() ) is turned into a TEMPLATE_DECL.
The character 'z' is used in name mangling.
If the template template parameter is used in a type, it is encoded as
zX?? (?? = template argument level and index).
If used as template argument in signature, the argument is encoded as
z + <number of parameter> + <parameter list>
+ <length of substituted template name>
+ <subst. template name>
Enjoy!
Kriang
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1998-01-16 14:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-01-16 14:37 Template template parameter patch Mike Stump
-- strict thread matches above, loose matches on Subject: below --
1998-01-16 1:51 Kriang Lerdsuwanakij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).