On Thursday, 8 November 2018 at 12:45:57 UTC, Alex wrote:
Hmm... not sure, if I got your idea... Do you think about something like this?
**snip**
class Bar(TFoo) if(is(TFoo : IFoo)) { typeof(scoped!TFoo()) _foo; this() { _foo = scoped!TFoo(); } }
Yes, pretty much.Except if you want to pass a parameter to TFoo it'll become a mess.
And I expecially don't want it to become messy.