News for hackers. Stuff that matters.
Re:Bjarne Stroustrup: “I Did It for You All” (2007) by skulk on Wednesday December 08, 2021 @01:20PM (#29488338)
Isn'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>?
Re:Bjarne Stroustrup: “I Did It for You All” (2007) by DSingularity on Wednesday December 08, 2021 @01:59PM (#29488836)
Templating 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.