3 ms·
That had been brought up elsewhere. Let me just copy-paste my response: "I think enums allow a bit more flexibility. For example, if you need to store a piece
by nice_byte 8y ago
That had been brought up elsewhere. Let me just copy-paste my response:
"I think enums allow a bit more flexibility. For example, if you need to store a piece of data that indicates which option to set, it's easier to do with an enum (can't store the "name" of the bitfield, and you're not permitted to take its address or offset either IIRC).
I also like the 'Option1 | Option2 | ... ' syntax for creating bitmasks on the fly (not sure how you'd achieve that with bitfields)"