digitalmars.D.learn - Getting template details?
- Simen kjaeraas (13/13) Dec 05 2009 Inspired by Nick's post on stringof weirdness, I started wondering - is
- Simen kjaeraas (5/16) Dec 08 2009 Nobody? Maybe I should file an enhancement request for this, then.
Inspired by Nick's post on stringof weirdness, I started wondering - is
there a way to get ahold of the FQN of the template (not the
instantiation), given an instantiation? Same goes for getting a typetuple
of the parameters. Anyone know?
Basically, what I thought might work would be:
template getTemplate( T : U!( V ), U, V... ) {
alias U getTemplate;
}
template TemplateParameters( T : U!( V ), U, V... ) {
alias V TemplateParameters;
}
--
Simen
Dec 05 2009
On Sun, 06 Dec 2009 07:20:28 +0100, Simen kjaeraas
<simen.kjaras gmail.com> wrote:
Inspired by Nick's post on stringof weirdness, I started wondering - is
there a way to get ahold of the FQN of the template (not the
instantiation), given an instantiation? Same goes for getting a typetuple
of the parameters. Anyone know?
Basically, what I thought might work would be:
template getTemplate( T : U!( V ), U, V... ) {
alias U getTemplate;
}
template TemplateParameters( T : U!( V ), U, V... ) {
alias V TemplateParameters;
}
Nobody? Maybe I should file an enhancement request for this, then.
--
Simen
Dec 08 2009








"Simen kjaeraas" <simen.kjaras gmail.com>