Is it possible to check if a type is an instance of a template?

Jonathan M Davis jmdavisProg at gmx.com
Thu Sep 15 16:18:31 PDT 2011


On Thursday, September 15, 2011 14:17 Andrej Mitrovic wrote:
> On 9/15/11, Jonathan M Davis <jmdavisProg at gmx.com> wrote:
> > Every template instantiation is a new set of code with _zero_ assocation
> > with
> > any other template instantation.
> 
> Yeah, I know. But I don't think this has to be set in stone. Having
> some specific compile-time type information about a template instance
> would be cool.

True. I think that it could be made possible to get traits information on 
whether something is an instantation of a particular template without changing 
how templates work in general, but it just doesn't work that way right now.

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list