
I have a class that mostly remains the same except for the variables and functions to retrieve the variables. I've looked at boost preprocessor and it seems more designed to create classes that have a fixed number of variables but different defaults. Could any of the boost libraries turn the included class into boilerplate code that allows an arbitrary number of variables? The example below only has three variables but I could have used any number. Ryan //Minimal detail. Not complete class struct Arguments { Arguments(void) { xxx = false; yyy = 3; zzz = 4530; } bool operator== (Arugments const& rhs) { return ( (xxx == rhs.xxx) && (yyy == rhs.yyy) && (zzz == rhs.zzz)); } bool getXXX(void) const { return xxx; } int getYYY(void) const { return yyy; } long getZZZ(void) const { return zzz; } bool xxx; int yyy; long zzz; }; //Would like to be able to call it instead something like this Create( Arguments, //Class name ((bool, xxx, getXXX, false), (int, yyy, getYYY, 3), (long, zzz, getZZZ, 4530)));