Bit-field with std::byte as member type cannot be initialized: bug or feature?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In C++20 bit-field initializer are possible. But this feature seems
impossible to use with std::byte.

struct Test {
    std::byte a : 2 = std::byte{0}; // NOK
    uint8_t   b : 2 = 0; // OK
};

Is this intentional or a bug in g++-10 (the version I'm using).

Thanks,
 Wilhelm



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux