pointers-to-members, (custom) array implementation

Jarrett Billingsley kb3ctd2 at yahoo.com
Thu Feb 8 07:04:27 PST 2007


"Frits van Bommel" <fvbommel at REMwOVExCAPSs.nl> wrote in message 
news:eqess1$2ito$1 at digitaldaemon.com...
>
> Try these (off the top of my head):
> ---
> int Pt2Mem!(char[] go)(C c, int i)
> {
>     return mixin("c." ~ go ~ "(i)");
> }

This one works just fine :)

> or:
> ---
> int Pt2Mem!(char[] go)(C c, int i)
> {
>     mixin("return c." ~ go ~ "(i)");
> }
> ---

This one has to have a semicolon at the end of the string, since the mixin 
statement strings have to be complete statements.  But this works too. 





More information about the Digitalmars-d mailing list