Proposal: user defined attributes

Jacob Carlborg doob at me.com
Wed Mar 21 14:10:06 PDT 2012


On 2012-03-21 19:32, Steven Schveighoffer wrote:

> In my proposal, I specified that the annotation can be applied only to
> module-level functions (normal or templated), and the result of those
> functions is what gets saved. So with that capability, you should be
> able to store any CTFE-evaluatable struct:
>
> @annotation auto makeAPoint() {Point2d p; return p;}
>
> @makeAPoint int x;

Does "@makeAPoint int x;" expand to "Point2d p; return p;"?

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list