This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: (C++) fix instantiation of typename types
- To: jason at redhat dot com
- Subject: Re: (C++) fix instantiation of typename types
- From: Mark Mitchell <mark at codesourcery dot com>
- Date: Wed, 21 Jun 2000 09:45:51 -0700
- Cc: gcc-patches at gcc dot gnu dot org
- Organization: CodeSourcery, LLC
- References: <200006211635.MAA25267@casey.cygnus.com>
>>>>> "Jason" == Jason Merrill <jason@redhat.com> writes:
BTW, it seems odd that a TEMPLATE_TEMPLATE_PARM is considered a type.
But I'll leave that for another time.
The hokey thing is that when a TEMPLATE_TEMPLATE_PARM is instantiated
with some arguments (in a template declaration, like:
template <template <class T> class D, class E>
class F {
D<E> de;
}
then the D<E> thing is a TEMPLATE_TEMPLATE_PARM with TEMPLATE_INFO.
So, TEMPLATE_TEMPLATE_PARMs can be either parameters, or stand-ins for
actualy types.
I think this is a weird design. I don't remember which of us reviewed
the patches for this stuff, but I don't remember noticing this in any
case. I think the instantiations should actually be RECORD_TYPEs,
probably. But, that's why things are the way they are, I think.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com