Re: UDA and mixins

2014-12-16 Thread Oleg via Digitalmars-d-learn
struct FooPasted(Args...){} class A { mixin foo; void func1() @mark { ... } void func2( int x, string a ) @mark { ... } } must change to: class A { void func1() @mark { ... } void func2( int x, string a ) @mark { ... } FooPasted!() func1_mark; FooPasted!(int,string) func2_mark; }

UDA and mixins

2014-12-16 Thread Oleg via Digitalmars-d-learn
I want to write mixin template, what past and/or change some code in class. Mixin must get all functions with user defined attribute and past fields for example. It should looks like this struct FooPasted(Args...){} class A { mixin foo; void func1() @mark { ... } void func2( int x, string a )