4 ms·
I think they were referring to the default member initializer, a feature added in C++11 not exclusive to bitfields. I couldn't see any reference to anything sim
by scaredginger 4y ago
I think they were referring to the default member initializer, a feature added in C++11 not exclusive to bitfields. I couldn't see any reference to anything similar in what you linked (admittedly, I skimmed though).
For example:
struct X {
int defaulted = 1; // 1 is the default member initializer
};
- MontyCarloHall 4y ago>I think they were referring to the default member initializer Ah, that would make more sense. The combination of bitfield and default initializer syntax does look especially odd, since both features are rarely used IME. >I couldn't see any reference to anything similar in what you linked Indeed, there is no way to specify default values for a C struct at definition time.