User defined attributes use
Jacob Carlborg
doob at me.com
Mon Sep 23 00:47:32 PDT 2013
On 2013-09-20 16:12, simendsjo wrote:
> You could of course fix this in a library too.
>
> enum AttributeUsage {
> struct_ = 1 << 0,
> class_ = 1 << 1,
> //etc
> }
>
> struct attribute { AttributeUsage usage; }
>
> Then the library could give a compile-time error if you tries to use it
> where it's not meant to be.
I'm not sure how I could do that.
--
/Jacob Carlborg
More information about the Digitalmars-d-learn
mailing list