News for hackers. Stuff that matters.
Re:In C++, is empty() faster than comparing the size with zero? by edflsafoiewq on Thursday October 28, 2021 @01:56PM (#29028998)
It's only UB for positive n. For negative n, it is an is-even test, so it can't be optimized to return true.
Re:In C++, is empty() faster than comparing the size with zero? by whimsicalism on Thursday October 28, 2021 @01:58PM (#29029030)
Oh yeah - negative numbers exist, doh!