1115
Tell me the truth ... (piefed.jeena.net)
you are viewing a single comment's thread
view the rest of the comments
[-] borokov@lemmy.world 2 points 1 day ago
auto v = std::vector<bool>(8);
bool* vPtr = v.data;
vPtr[2] = true;
// KABOOM !!!

I've spent days tracking this bug... That's how I learned about bool specialisation of std::vector.

this post was submitted on 15 May 2025
1115 points (100.0% liked)

Programmer Humor

23326 readers
342 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS