Re: opApply with Type Inference and Templates?

2017-02-16 Thread Ali Çehreli via Digitalmars-d-learn

On 02/15/2017 07:20 PM, Jerry wrote:

I am trying to do opApply to work when the delegate passed when it is
and isn't nogc/nothrow. As soon as you involve a template though, type
inference goes out the door. I want to be able to use opApply with
templates (to get the auto @nogc/nothrow deducation passed on the
delegate passed) but still be able to use type inference. Is there any
way to do this?


Related:

  http://forum.dlang.org/post/ovitindvwuxkmbxuf...@forum.dlang.org

Ali



Re: opApply with Type Inference and Templates?

2017-02-16 Thread Jerry via Digitalmars-d-learn

On Thursday, 16 February 2017 at 04:09:18 UTC, Basile B. wrote:

No, by any chance do you ask this for the tuple unpacking PR ?
If so I've also tried and failed.


Was just trying to use a container I created in functions with 
and without @nogc/nothrow.





Re: opApply with Type Inference and Templates?

2017-02-15 Thread Basile B. via Digitalmars-d-learn

On Thursday, 16 February 2017 at 03:20:12 UTC, Jerry wrote:
I am trying to do opApply to work when the delegate passed when 
it is and isn't nogc/nothrow. As soon as you involve a template 
though, type inference goes out the door. I want to be able to 
use opApply with templates (to get the auto @nogc/nothrow 
deducation passed on the delegate passed) but still be able to 
use type inference. Is there any way to do this?


No, by any chance do you ask this for the tuple unpacking PR ?
If so I've also tried and failed.


opApply with Type Inference and Templates?

2017-02-15 Thread Jerry via Digitalmars-d-learn
I am trying to do opApply to work when the delegate passed when 
it is and isn't nogc/nothrow. As soon as you involve a template 
though, type inference goes out the door. I want to be able to 
use opApply with templates (to get the auto @nogc/nothrow 
deducation passed on the delegate passed) but still be able to 
use type inference. Is there any way to do this?