I was just thinking that the new std::array function make more sense the overload then the std::vector for std::array of bool as is could work algorithms on a bit array. the array size would be N / (number of bits is a byte). I just want to know if there is anything wrong with this proposal?
I think it is a better idea but I do not like modify operators. Also, I would like an iterator for accessing bits as either true of false
On Saturday, June 9, 2018 at 1:05:57 PM UTC-5, Nicol Bolas wrote:On Saturday, June 9, 2018 at 1:03:30 PM UTC-4, vic...@gmail.com wrote:I was just thinking that the new std::array function make more sense the overload then the std::vector for std::array of bool as is could work algorithms on a bit array. the array size would be N / (number of bits is a byte). I just want to know if there is anything wrong with this proposal?So, you want to take one of the biggest mistakes of C++98's standard library, the consequences of which we are still feeling to this day... and proliferate it?No. If you want to have some optimized bit-array, that's fine. In fact, we already have that; it's called `std::bitset`. Go use that. Specializations of container templates should not be used to create optimizations like that.
--
---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-discussio...@isocpp.org.
To post to this group, send email to std-dis...@isocpp.org.
Visit this group at https://groups.google.com/a/isocpp.org/group/std-discussion/.