On Thursday, 15 September 2016 at 01:40:50 UTC, Anonymouse wrote:
You mean, the literal string name of the original symbol you
passed as an alias? If so then you want the .stringof property.
void main () {
int first;
bool second;
string third;
mixin Foo!(first, second, third);
}
mixin template Foo(alias abc, alias def, alias ghi)
{
static assert(abc.stringof == "first");
static assert(def.stringof == "second");
static assert(ghi.stringof == "third");
}
Aha! Yes, that's exactly what I was looking for! Thanks!