Provides a bit-vector, an optimized replacement of the infamous std::vector<:b:ool>. In addition to the bit-vector, the library also provides implementations of STL algorithms tailored for bit-vectors.
BSD 3-Clause "New" or "Revised" License
68
stars
4
forks
source link
`auto` deduces type as reference even without `&` #30
auto will deduce the type as a reference type, even without the &. This means that:
bit::bit_vector<unsigned char> bvec{"110110"};
auto b = bvec.front() // Should be copied, auto -> bit_value, but instead auto -> bit_reference
b = ~b;
std::cout << bvec.debug_string() << std::endl; // Outputs 010110
auto
will deduce the type as a reference type, even without the&
. This means that: