Convert this C define to D

Regan Heath regan at netmail.co.nz
Tue May 22 05:30:21 PDT 2007


Hi all,

I have this C macro:

#define STACK_OF(type) STACK

usage:

struct foo {
  STACK_OF(Bob) bobStack;
}

lets ignore the fact that the replacement STACK doesn't include with the type it was given, in this case/stage it's not important.

I feel like I should be able to replace this C macro with a template/mixin of some kind but as templates/mixins aren't my strongest d-foo (kungfoo) technique I figured I had best ask for opinions.

Regan


More information about the Digitalmars-d-learn mailing list