Encapsulate return value in scoped

Ali Çehreli via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Jun 18 17:00:49 PDT 2015


On 06/18/2015 04:53 PM, Yuxuan Shui wrote:

 > On Thursday, 11 June 2015 at 21:38:59 UTC, Ali Çehreli wrote:

 >> About returning scoped!C, I think it works:

 > I just find out that the document of scoped says that "It's

Thanks for fixing the typo there. (The documentations has lower case: 
"it's". ;) )

 > illegal to
 > move a class instance

Wait! You fixed that as well? :) The doc that I am looking at says 
"class reference":

   http://dlang.org/phobos/std_typecons.html#.scoped

 > even if you are sure there are no pointers to it.
 > As such, it is illegal to move a scoped object."
 >
 > So this is not a solution?

I guess not. :-/

Ali



More information about the Digitalmars-d-learn mailing list