But it gives compile errors. Note: this function is in a class.
error C2620: member 'Lypher::ToBits::<unnamed-tag>::Bits' of union 'Lypher::ToBits::<unnamed-tag>' has user-defined constructor or non-trivial default constructor
error C2039: 'Bits' : is not a member of 'Lypher::ToBits::<unnamed-type-CharBit>'
see declaration of 'Lypher::ToBits::<unnamed-type-CharBit>'
Well, I guess you were bored to search a bit :P Check the constructor example. You can initialize a bitset with an unsigned long. When you use an unsigned char instead, it is silently converted to an unsigned long.