microsoft / STL

MSVC's implementation of the C++ Standard Library.
Other
10.25k stars 1.51k forks source link

<bitset>: Use fewer bytes for small bitsets #1498

Open StephanTLavavej opened 4 years ago

StephanTLavavej commented 4 years ago

Currently, bitset consumes at least 4 bytes:

https://github.com/microsoft/STL/blob/19c683d70647f9d89d47f5a0ad25165fc8becbf3/stl/inc/bitset#L23-L29

This is a penalty for users who want to use a small bitset as a more-strongly-typed replacement for a small integer.

AlexGuteniev commented 2 weeks ago

Also should use public data, see #496