digitalmars.D - RTTI for templates
- Stephan Wienczny (7/7) May 23 2004 Hallo,
- Norbert Nemec (5/15) May 23 2004 ??? Templates are no types! Could you clarify what you mean?
- J Anderson (18/38) May 23 2004 I think he may mean something like:
- Norbert Nemec (3/24) May 23 2004 Of course it should. I would consider that just a plain bug in the
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:-- -Anderson: http://badmama.com.au/~anderson/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
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.
May 23 2004