Would anyone know how to extract the size of a bit-field member. The below code naturally gives me the size of an integer, but how do I find out how many bits or b
There is no way to get this information (apart from reading the declaration yourself). As per the standard, [C++11]expr.sizeof§1, it's illegal to call sizeof on a bit-field:
The sizeof operator shall not be applied to ... an lvalue that designates a bit-field.