4 ms·
Like std::vector<bool>. Damn you std::vector<bool>.
by DSingularity 5y ago
Like std::vector<bool>. Damn you std::vector<bool>.
- skulk 5y agoIsn't that the poster-child of template metaprogramming? Being able to choose a different sub-byte layout for your container type depending on the type parameter? What problems are you running into when using std::vector<bool>?
- DSingularity 5y agoTemplating has nothing to do with my hate. It’s the fact that for all other vector types you can assume that index-based access only conflict for the same index. The only exception is… Of course it’s unlikely for you to know this because who knows all the nuances of C++ so you end up with a race in your code. Those can be very hairy to crash, reproduce, and debug.