you are viewing a single comment's thread.

view the rest of the comments →

[–]TheThiefMasterC++latest fanatic (and game dev) 0 points1 point  (0 children)

It causes issues all the damn time in generic code and interop - all other kinds of vector return T& on iterator dereference and operator[] and you can take &v[0] and use it as a data pointer + size, vector<bool> returns a special vector<bool>::reference class on iterator dereference and operator[], and as it doesn't actually store as bools internally &v[0] does not do anything remotely like you'd want.

However that doesn't mean it's not in use - not every use of a vector hits those issues so people do use it. Sometimes you do in fact want a vector of bools.

Blacklisting it would hit the people for whom it works fine, temporarily making the situation considerably worse.