
Hi, struct inputs { double input1; int input2; bool input3; }; Given type 'inputs', how to I write a metafunction that can return to me this type: rangify<inputs>::type identical to struct inputs_rangified { union { double fixed; boost::tuple<double, double, double> range; } input1; // range is min, max, increment union { int fixed; boost::tuple <int, int, int> range; } input2; union { bool fixed; std::pair<bool, bool> range; } input3; std::bitset<3> is_range; }; 1. Is it possible to get the number of members of a struct at compile-time? 2. What would be the easiest way to fill inputs_rangified from an input stream? Typically, my application will have hundreds different 'inputs' types and I would like to automate this process. Regards,