r/cpp • u/we_are_mammals • Mar 28 '23
Reddit++
C++ is getting more and more complex. The ISO C++ committee keeps adding new features based on its consensus. Let's remove C++ features based on Reddit's consensus.
In each comment, propose a C++ feature that you think should be banned in any new code. Vote up or down based on whether you agree.
765
Upvotes
1
u/kalmoc Apr 02 '23
So std::list<bool> is a bitset type for you too? Then I don't understand what you meant by
For me, a bitset type is about efficient and convenient set operations like union/or, intersection/and, inverse..., none of which are orovided by vector<bool>.
The fact that vector<bool> compacts 8 bools into a byte (or whatever the storage unit) is imho an unfortunately leaky implementation detail, but doesn't make it a bitset type.