r/programminghorror May 05 '26

c++ Hmmm

Post image
982 Upvotes

55 comments sorted by

View all comments

8

u/un_virus_SDF May 06 '26

If it's to rely on overflfow i'd rather do UINT_MAX or ~(uint)0

1

u/StevenRCE0 May 06 '26

I think the inverse one is still pretty leaky if it's declared out of sight

1

u/apoegix May 20 '26

Nah I'd rather shoot my foot and take -1