www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Return all objects with specified UDA?

reply "Carl" <fake email.com> writes:
I am experimenting with user defined attributes, but am wondering 
if a list of all objects with a specified UDA could be generated?

If not, is there a workaround for getting these objects without a 
direct reference?
Jul 20 2013
parent Jacob Carlborg <doob me.com> writes:
On 2013-07-21 06:21, Carl wrote:
 I am experimenting with user defined attributes, but am wondering if a
 list of all objects with a specified UDA could be generated?

 If not, is there a workaround for getting these objects without a direct
 reference?
If you modify druntime you can do it. This template gets instantiated with every user defined type: https://github.com/D-Programming-Language/druntime/blob/master/src/object.di#L644 -- /Jacob Carlborg
Jul 21 2013