Re: delegate, template and alias

2011-12-19 Thread Heromyth
== Quote from Philippe Sigaud (philippe.sig...@gmail.com)'s article On Sun, Dec 18, 2011 at 14:13, Heromyth bitwo...@qq.com wrote: I have a delegate as a parameter in a function which is a template function. And I want to use alias for the delegate parameter. Is there a better way for this?

Re: delegate, template and alias

2011-12-19 Thread Heromyth
== Quote from Heromyth (bitwo...@qq.com)'s article == Quote from Philippe Sigaud (philippe.sig...@gmail.com)'s article I suppose you do *not*want the commented line? I want to convert a delegate type define in C# to D's, as such: public delegate void AsynchronousActionT(T argument,

Re: delegate, template and alias

2011-12-19 Thread Philippe Sigaud
On Mon, Dec 19, 2011 at 15:35, Heromyth bitwo...@qq.com wrote: Woo, I got it. What's the difference with your first post?

Re: delegate, template and alias

2011-12-19 Thread Timon Gehr
On 12/19/2011 06:46 PM, Philippe Sigaud wrote: On Mon, Dec 19, 2011 at 15:35, Heromythbitwo...@qq.com wrote: Woo, I got it. What's the difference with your first post? He uses an eponymous template now.

Re: delegate, template and alias

2011-12-19 Thread Philippe Sigaud
On Mon, Dec 19, 2011 at 18:49, Timon Gehr timon.g...@gmx.ch wrote: On 12/19/2011 06:46 PM, Philippe Sigaud wrote: On Mon, Dec 19, 2011 at 15:35, Heromythbitwo...@qq.com  wrote: Woo, I got it. What's the difference with your first post? He uses an eponymous template now. Ah yes, thanks.

Re: delegate, template and alias

2011-12-19 Thread Timon Gehr
On 12/19/2011 09:30 PM, Philippe Sigaud wrote: On Mon, Dec 19, 2011 at 18:49, Timon Gehrtimon.g...@gmx.ch wrote: On 12/19/2011 06:46 PM, Philippe Sigaud wrote: On Mon, Dec 19, 2011 at 15:35, Heromythbitwo...@qq.comwrote: Woo, I got it. What's the difference with your first post?

delegate, template and alias

2011-12-18 Thread Heromyth
I have a delegate as a parameter in a function which is a template function. And I want to use alias for the delegate parameter. Is there a better way for this? My demo code: template AsynchronousAction(T) { alias void delegate(T argument) FuncType; } public class TestC { int b

Re: delegate, template and alias

2011-12-18 Thread Philippe Sigaud
On Sun, Dec 18, 2011 at 14:13, Heromyth bitwo...@qq.com wrote: I have a delegate as a parameter in a function which is a template function. And I want to use alias for the delegate parameter. Is there a better way for this? I suppose you do *not*want the commented line? You can extract a