https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63218
Bug ID: 63218 Summary: More compact std::bitset<n> for small n Product: gcc Version: 5.0 Status: UNCONFIRMED Keywords: ABI Severity: enhancement Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: glisse at gcc dot gnu.org sizeof(std::bitset<1>) is 8 on x86_64. It would be nice if it was reduced a bit. For efficiency reasons, it makes sense to keep std::bitset<65> of size 16, but for anything using at most 32 bits, using a smaller underlying type would be better. I had already though about that a long time ago, and was reminded by reading: https://groups.google.com/a/isocpp.org/d/msg/std-proposals/UjNcLLrGwv8/Pe1Icl6h6xQJ (another ABI-breaking change in bitset would be to set _WordT to unsigned long long on win64)