UDAs on function calls or return locations?

Mike Brown mikey.be at gmail.com
Mon Jun 14 13:29:58 UTC 2021


Hi all,

Is it possible to add a UDA onto either the function call, and 
detect its present? or onto the variable that the result will go 
to?

E.g.
auto int x = function() @UDA;

     int function() {
       if (hasUDA(call_site)) { ... }
     }

or

@UDA int y = function();

     int function() {
       if (hasUDA(RESULT)) { ... }
     }

Kind regards,
Mike Brown


More information about the Digitalmars-d-learn mailing list