Thread overview
RTTI for templates
May 23, 2004
Stephan Wienczny
May 23, 2004
Norbert Nemec
May 23, 2004
J Anderson
May 23, 2004
Norbert Nemec
May 23, 2004
Hallo,

Is there a special RTTI for templates? What are the RTTI rules for
templates?
IMHO classinfo.name should reflect the type used when instancing the
template.

There is not much information about RTTI given in docs ;-(

Stephan

May 23, 2004
??? Templates are no types! Could you clarify what you mean?

Currently I do not see where templates and RTTI should interfere with each other. Templates are handled at compile-time. I do not see where runtime-polymorphism, and with it, RTTI should come into play there.


Stephan Wienczny wrote:

> Hallo,
> 
> Is there a special RTTI for templates? What are the RTTI rules for
> templates?
> IMHO classinfo.name should reflect the type used when instancing the
> template.
> 
> There is not much information about RTTI given in docs ;-(
> 
> Stephan

May 23, 2004
Norbert Nemec wrote:

>??? Templates are no types! Could you clarify what you mean?
>
>Currently I do not see where templates and RTTI should interfere with each
>other. Templates are handled at compile-time. I do not see where
>runtime-polymorphism, and with it, RTTI should come into play there.
>  
>

I think he may mean something like:


class Thing(T)
{
  }

void main()
{
   Thing!(int) thing = new Thing!(int);
     printf("%.*s\n", thing.classinfo.name);

}

output:
Thing

Parhaps the output should really be:
Thing!(int)

>
>Stephan Wienczny wrote:
>
>  
>
>>Hallo,
>>
>>Is there a special RTTI for templates? What are the RTTI rules for
>>templates?
>>IMHO classinfo.name should reflect the type used when instancing the
>>template.
>>
>>There is not much information about RTTI given in docs ;-(
>>
>>Stephan
>>    
>>
>
>  
>


-- 
-Anderson: http://badmama.com.au/~anderson/
May 23, 2004
J Anderson wrote:

> I think he may mean something like:
> 
> 
> class Thing(T)
> {
> 
> }
> 
> void main()
> {
>     Thing!(int) thing = new Thing!(int);
> 
>     printf("%.*s\n", thing.classinfo.name);
> 
> }
> 
> output:
> Thing
> 
> Perhaps the output should really be:
> Thing!(int)

Of course it should. I would consider that just a plain bug in the implementation.