Idiomatic way to check for UDA?

via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Jun 7 04:37:29 PDT 2015


On Sunday, 7 June 2015 at 06:20:55 UTC, ketmar wrote:
> On Sun, 07 Jun 2015 05:32:46 +0000, Tofu Ninja wrote:
>
>> Whats the idiomatic way to check if an identifier has a 
>> specific UDA
>> attached to it.
>> 
>> Also what should I use to define a UDA that doesn't need to 
>> carry any
>> data? Just an empty template? Or does something else make more 
>> sense?
>
> there is `std.traits.hasUDA` added to phobos recently.

Service:
https://github.com/D-Programming-Language/phobos/pull/3356
https://github.com/D-Programming-Language/phobos/pull/3363


More information about the Digitalmars-d-learn mailing list