Recursive typedef

Markus Dangl danglm at in.tum.de
Thu Oct 5 08:51:33 PDT 2006


Hello,

I'm trying to write a function like that:

typedef ParseFn function(char[] s) ParseFn;

i.E. a function that returns a pointer to a new function of equal type. 
DMD gives me the error "circular reference of typedef ParseFn". Of 
course i could be using a "void *" as return type, but there must be a 
better (typesafe) way... Has anyone tried this before?



More information about the Digitalmars-d-learn mailing list