Hacker News new | past | comments | ask | show | jobs | submit login

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
    };



>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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: