Using attributes inside template instantiation

Meta via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Jun 26 09:07:32 PDT 2014


On Thursday, 26 June 2014 at 07:11:03 UTC, Uranuz wrote:
> But if I write
>
> @("hello") struct Hello {}
>
> so all of the variables that have type Hello will have 
> attribute @("hello") like come type qualifier because attribute 
> is a part of declaration of Hello. Do I understand correctly?

No, it is only the symbol Hello that will have the attribute 
@("hello"). Attributes are attached to symbols, not types or 
values.


More information about the Digitalmars-d-learn mailing list