www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Automatical generation of class member functions in respect of some interface

It was fun to implement the subj.

At first, I wrote it using ParameterTypeTuple!() template. Hence, no storage
classes (ref, out, lazy etc.) are supported. But it works.



Then I was suggested to implement the same thing by means of parsing function
type .stringof, which contains full function declaration (including storage
classes). So I did this. This version supports storage classes, but it won't
work if there are functions with default parameters or variadics. My lame
parser doesn't support such things, but I guess it's possible to implement them
as well.

Jan 10 2010