• timhh
    link
    fedilink
    arrow-up
    24
    ·
    1 day ago

    Well there are containers that store booleans in single bits (e.g. std::vector<bool> - which was famously a big mistake).

    But in the general case you don’t want that because it would be slower.

      • bitcrafter
        link
        fedilink
        arrow-up
        4
        ·
        24 hours ago

        The mistake was that they created a type that behaves like an array in every case except for bool, for which they created a special magical version that behaves just subtly different enough that it can break things in confusing ways.