Explicit default constructor for structs

Walter Bright newshound2 at digitalmars.com
Wed Apr 9 11:42:06 PDT 2014


On 4/9/2014 7:59 AM, Benjamin Thaut wrote:
> What do you think? C&C welcome.

Or you could use a factory function:

   struct Foo {
     static Foo factory() { ... }
     ...
   }

   auto foo = Foo.factory();




More information about the Digitalmars-d mailing list