How to provide this arg or functor for algorithm?

Ali Çehreli via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Aug 16 08:29:09 PDT 2015


On 08/16/2015 04:53 AM, FreeSlave wrote:

 > The problem is that this allocates delegate, so it can't be used in
 > @nogc code.

Would constructing the delegate by setting its .funcptr and .ptr 
properties work in this case? You can have a pool of context objects 
which become the context for the delegate.

   http://ddili.org/ders/d.en/lambda.html#ix_lambda..funcptr

Ali



More information about the Digitalmars-d-learn mailing list