Scrapple.Tools to the rescue!
downs
default_357-line at yahoo.de
Tue Jun 17 04:33:45 PDT 2008
Janice Caron wrote:
> I've been quiet for a while. (Actually, I've been offline for a
> while). So, I thought I'd better come back with a new feature request!
> :-) Type inference for new. Here's an example:
>
> class C(T)
> {
> Some!(Funky!(Class!(T))) funky;
>
> this()
> {
> funky = new;
> }
> }
>
I quote from tools.base:
> void New(S, T...)(ref S inst, T t) { inst=new S(t); }
Example usage:
> this()
> {
> New(funky);
> }
--downs
More information about the Digitalmars-d
mailing list