Partial class implementation
Robert Fraser
fraserofthenight at gmail.com
Tue Jul 17 14:32:41 PDT 2007
BCS Wrote:
> Reply to Robert,
>
> > This is already possible via template mixins (sort of, but alias
> > template params are required to access fields), but explicit partials
> > might be quite helpful.
>
>
> IIRC this works. Or did I misread you?
>
> template Foo()
> {
> int get(){ return foo; }
> void set foo(int i){foo = i;}
> }
>
> class Bar
> {
> int foo;
> mixin foo!();
> }
>
>
Yup; that's what I'm doing now.
More information about the Digitalmars-d
mailing list