Bit vector and bitset

前端 未结 2 1777
南方客
南方客 2020-12-21 22:44

What is the difference between bit-vector and bitset container of stl ? Please explain. To my understanding bitset is the implementation of the concept of bitvector am I rig

2条回答
  •  执念已碎
    2020-12-21 23:17

    bit_vector has the same interface as an std::vector, and is optimised for space. It not a part of standard C++. This documentation claims it is close to an STL vector, which presumably is quite close to a standard C++ std::vector.

    std::bitset is fixed size, and has a different interface.

提交回复
热议问题