delegate as memeber

Jacob Carlborg doob at me.com
Tue Feb 21 09:46:35 PST 2012


On 2012-02-21 16:55, deadalnix wrote:
> Le 21/02/2012 16:48, Adam D. Ruppe a écrit :
>> A possible workaround is to initialize the delegate
>> in the object's constructor.
>
> It is a struct. And struct don't have default constructor. It lead to
> very segfault prone code (I did try that).

You can implement a static opCall and use that instead of the constructor.

-- 
/Jacob Carlborg


More information about the Digitalmars-d-learn mailing list