Aliases and UDA's
Daniel Murphy via Digitalmars-d
digitalmars-d at puremagic.com
Tue Dec 30 04:51:23 PST 2014
"Manu via Digitalmars-d" wrote in message
news:mailman.3785.1419919315.9932.digitalmars-d at puremagic.com...
> I guess the reason is that A is not really a thing; it is translated
> to S!int when being given to T?
> Is that the point where "world" is lost?
Yes. "world" is still there, but you can't actually get the symbol A.
> I'm not really sure how I can achieve what I want here... I need to
> attribute particular instantiations of a template struct as shown.
Why does it have to be UDAs? You can easily put the 'attributes' inside S
or define a template for getting the attributes from an arbitrary S.
Something like:
enum myAttributes(T : S!int) = TypeTuple!("world");
enum myAttributes(T : S!U, U) = TypeTuple!();
More information about the Digitalmars-d
mailing list