assert() vs. enforce(), invariant() vs. ... ?

Jacob Carlborg doob at me.com
Sat Aug 31 11:08:20 PDT 2013


On 2013-08-31 14:03, Andrej Mitrovic wrote:

> How will you pass a pointer to a constructor?

No, you invoke the constructor via a pointer.

https://github.com/D-Programming-Language/phobos/blob/master/std/conv.d#L4391

Replace that line with:

auto dg = &result.__ctor;
dg(args);

The static-if needs to be adjusted as well.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list