how to create a local copy of shared pointer?

denizzzka 4denizzz at gmail.com
Mon Oct 15 08:15:56 PDT 2012


void main()
{
     struct S { int payload; }

     S* s = new shared (S); // Why this is a illegal?
}


Error: cannot implicitly convert expression (new shared(S)) of 
type shared(S)* to S*


More information about the Digitalmars-d-learn mailing list