recursive delegate declaration

Walter Bright newshound at digitalmars.com
Tue Jun 20 16:30:05 PDT 2006


kris wrote:
> I have a situation whereby a delegate should return an instance of 
> itself, to enable call chaining. Here's my attempt, which compiles and 
> appears to work with dmd 161:

This is an old problem, going back to C. How do you declare a function 
type that returns itself? The only way is with a cast and a typedef (alias).



More information about the Digitalmars-d mailing list