cm0002@lemmy.worldcake to Programmer Humor@programming.dev · 1 month agoTell me the truth ...imagemessage-square169linkfedilinkarrow-up11.16Karrow-down117
arrow-up11.14Karrow-down1imageTell me the truth ...cm0002@lemmy.worldcake to Programmer Humor@programming.dev · 1 month agomessage-square169linkfedilink
minus-squareborokov@lemmy.worldlinkfedilinkarrow-up2·29 days agoauto 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.
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.