struct template constructors

Boris-Barboris via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Jun 22 12:06:50 PDT 2017


Hi

https://dpaste.dzfl.pl/0def4e286564

Is there a cleaner way to go than the one on the line 26? And why 
is the constructor

/d475/f781.d(37): f781.UniquePtr!(A).UniquePtr.__ctor(DT)(ref 
scope UniquePtr!DT rhs)

unfit for line 51?
Is it because the expression " = UniquePtr!B.make()" cannot be 
interpreted as "scope ref"? It must release ownership of a 
pointer it holds, and looks like it cannot do it in this form.


More information about the Digitalmars-d-learn mailing list