Re: Get template and its instantiation parameters

2009-10-07 Thread BCS
Hello Jarrett, On Wed, Oct 7, 2009 at 12:54 PM, BCS wrote: You could try parsing T.stringof at compiletime to extract the parts you need. This is *exactly* the kind of bullshit that I hate about string mixins. The question was how to do somthing now. If the best solution isn't that good

Re: Get template and its instantiation parameters

2009-10-07 Thread Christopher Wright
BCS wrote: Hello Michal, If one has a template instance, is it possible to get template name and parameter type that was used for instantiating, at compile time? consider: class List (T) {} List!(int) lst; Foo (lst); I want to create such template Foo which prints: List!(int) List int You

Re: Get template and its instantiation parameters

2009-10-07 Thread Michal Minich
On Wed, 07 Oct 2009 13:15:46 -0400, Jarrett Billingsley wrote: > On Wed, Oct 7, 2009 at 12:54 PM, BCS wrote: >> Hello Michal, >> >>> If one has a template instance, is it possible to get template name >>> and parameter type that was used for instantiating, at compile time? >>> >>> consider: >>> >

Re: Get template and its instantiation parameters

2009-10-07 Thread Jarrett Billingsley
On Wed, Oct 7, 2009 at 12:54 PM, BCS wrote: > Hello Michal, > >> If one has a template instance, is it possible to get template name >> and parameter type that was used for instantiating, at compile time? >> >> consider: >> >> class List (T) {} >> >> List!(int) lst; >> Foo (lst); >> I want to crea

Re: Get template and its instantiation parameters

2009-10-07 Thread BCS
Hello Michal, If one has a template instance, is it possible to get template name and parameter type that was used for instantiating, at compile time? consider: class List (T) {} List!(int) lst; Foo (lst); I want to create such template Foo which prints: List!(int) List int You could try pa

Get template and its instantiation parameters

2009-10-07 Thread Michal Minich
If one has a template instance, is it possible to get template name and parameter type that was used for instantiating, at compile time? consider: class List (T) {} List!(int) lst; Foo (lst); I want to create such template Foo which prints: List!(int) List int Something simiar for Arrays can