BitLib
BitLib copied to clipboard
`auto` deduces type as reference even without `&`
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