rhalbersma / bit_set

Rebooting the std::bitset franchise
Boost Software License 1.0
40 stars 5 forks source link

Why is there no operator[] overloading ? #13

Closed wehostadm closed 6 months ago

wehostadm commented 10 months ago

Hi,

I would like to test your bitset implementation but there is no operator[] overloading. Is it normal ?

And what is the performance of your implementation over std::bitset ?

Thanks,

rhalbersma commented 6 months ago

Hi, (I had comment forwarding turned off, so didn't notice this before).

bit_set<N> is a packed representation for std::set<int>. Set have bidirectional iterators, no random access iterators and also no operator[].

I don't have systematic performance tests available. That might change in the future, but no promises.