Template constructor in a non-template struct.
ChrisG via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sat Feb 14 21:44:26 PST 2015
On Monday, 9 February 2015 at 09:52:13 UTC, Marc Schütz wrote:
>
> You could also hide the ugly __ctor() call behind a nicely
> named factory method.
Yes, that's pretty much what I ended up doing. Added a couple
static member functions like:
static Boring CreateWithOption1(args);
static Boring CreateWithOption2(args);
Then made the struct constructor private. Not too bad for now.
Thanks for your help.
More information about the Digitalmars-d-learn
mailing list