Hi Akim,

> I am saying that the values (those in backup_doc_vals for instance) are not 
> required to be ints.  I'm saying that in the example above backup_doc_vals 
> are enums, but they could be floats, structs, chars, whatever.  So there 
> cannot be a single type that would make it possible to write 

Ah, now I understand you.

> Or are you suggesting that users should define their own type.  Or do you 
> mean to provide a macro to instantiate such a type given a data type?  Or are 
> you suggesting to restrict to a single size data type?

Yes, these are the possible options.

As far as I understand, the type would consist of
  - an int, an enum value, or even a pointer to a statically allocated object
    defined by the programmer,
  - a constant string: the option,
  - (optional) a constant string: the documentation.

Restricting the type of the first field does not look like a good idea to me.

If the users define their own type, they have manual work when you add the
documentation string or other new features to argmatch.

So I would prefer a macro with one argument, the type of the first field.

Bruno


Reply via email to