UDAs and templates
Gor Gyolchanyan
gor.f.gyolchanyan at gmail.com
Tue Dec 18 10:16:16 PST 2012
So I have this use case:
struct MarkedForMagic
{
mixin template Lookup()
{
static this()
{
/* Look up all types, attributed with @MarkedForMagic and do
something with them. */
}
}
}
@MarkedForMagic class Magical1 { }
@MarkedForMagic class Magical2 { }
mixin MarkedForMagic,Lookup;
This question is: how do I register classes, which are inside templates?
@MarkedForMagic class Magical3(Type) { }
The symbol "Magical3" is not a class, but it contains potentially infinite
classes, every existing ones of which I need to know about.
How do I do this?
--
Bye,
Gor Gyolchanyan.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20121218/66872558/attachment.html>
More information about the Digitalmars-d
mailing list