Is there something like anonymous struct?

Jacob Carlborg doob at me.com
Mon Mar 4 23:27:57 PST 2013


On 2013-03-05 03:33, Steven Schveighoffer wrote:

> That doesn't name them.  I think you have to be more verbose when naming
> the members:
>
> __gshared immutable foo = Tuple!(typeof(&fn1), "func1", typeof(&fn2),
> "func2")(&fn1, &fn2);
>
> Wow, that really sucks.  Is there a better way?  I bet a mixin could
> help here...

This is a proposal I had before:

http://forum.dlang.org/thread/kfbnuc$1cro$1@digitalmars.com

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list