3

The c2hs reference (aka 'Tutorial') mentions the name of the C enum as a non-optional parameter. Is there any way to get it to work with anonymous enums? Determining which enum to generate should be possible given just a single enum member, or even if that's not possible it should at least be possible to generate an enum by explicitly naming it's members.

To clarify:

given an enum

enum {
A,
B,
C,
D
};

I'd like something along the lines of

{#enum {A,B,C,D} as MyEnum #}
Cubic
  • 14,902
  • 5
  • 47
  • 92

1 Answers1

1

enum define works (contrary to the documentation)

{# enum define MyEnum { A as A, B as B, C as C, D as D } #}
yiding
  • 3,482
  • 18
  • 17