On Wednesday, 3 August 2016 at 08:12:00 UTC, Ali Çehreli wrote:
On 08/02/2016 07:55 PM, Mark J Twain wrote:
[...]
I didn't know one could use 'auto ref' in this case but the
following simple test works:
auto foo(Func, Args...)(Func callback, auto ref Args args) {
return callback(args);
On 08/02/2016 07:55 PM, Mark J Twain wrote:
It's nice to be able to pass delegates and functions as callbacks.
A nice feature is something like
R foo(R,Args...)(R function(Args) callback, Args args) { return
callback(args); }
There are two problems with this.
One is that type deduction doesn'
It's nice to be able to pass delegates and functions as callbacks.
A nice feature is something like
R foo(R,Args...)(R function(Args) callback, Args args) { return
callback(args); }
There are two problems with this.
One is that type deduction doesn't work. I have to explicitly
specify the t