delegate as memeber

Timon Gehr timon.gehr at gmx.ch
Sat Feb 25 06:37:03 PST 2012


On 02/25/2012 03:32 PM, Stewart Gordon wrote:
> On 21/02/2012 17:46, Jacob Carlborg wrote:
>> On 2012-02-21 16:55, deadalnix wrote:
> <snip>
>> You can implement a static opCall and use that instead of the
>> constructor.
>
> But you don't have to call a static opCall. You can just declare a
> struct instance without any initialisation. Presumably half the point is
> to ensure that exceptionBuilder is still initialised in such cases.
>
> Stewart.

struct exceptionBuilder{
     @disable this();
     @disable enum init=0;
     static exceptionBuilder opCall(...){...}
}


More information about the Digitalmars-d-learn mailing list