The 5.7 kernel is out
The 5.7 kernel is out
Posted Jun 2, 2020 2:44 UTC (Tue) by mathstuf (subscriber, #69389)In reply to: The 5.7 kernel is out by Cyberax
Parent article: The 5.7 kernel is out
- auto& item = boolvec[3]; is busted as you get a proxy object instead of a real boolean
- does not work with parallel algorithms (the bits all write to the same byte and collide there)
- T* data = vec.data(); doesn't work in generic code when passed a vector<bool>
- I'm sure there are others
It's just a bad design the standard allows (it's not even required!) that won't get fixed due to ABI guarantees stdlib implementers are basically bound by from the ecosystem. Sure, the standard can tell them to do something, but they can also say "sorry, no can do" (they effectively have a veto on such things because of this).
The paper you refer to is basically about making T* -> bool a warning due to bugs and weird typesystem holes you fall into with the implicit cast floating about your generic code.
