Extract template parameter at runtime?

Steven Schveighoffer via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Jun 15 11:30:55 PDT 2015


On 6/15/15 2:10 PM, Yuxuan Shui wrote:
> I have a template class which is derived from a base class. Is it
> possible to extract the template parameter from a reference to the base
> class?

No. You can't get compile-time information at runtime, unless you have 
stored it somewhere that runtime can read.

But perhaps you can further describe your requirement, and a solution 
might be available.

-Steve


More information about the Digitalmars-d-learn mailing list