79824343

Date: 2025-11-19 10:53:28
Score: 1
Natty:
Report link

I'd like to emphasize the point of @Xavier Pedraza : Signed integers will be promoted to unsigned types if they have no bigger bit size. This can easily lead to errors.

Consider:

if (7 - std::size(vec) < 0)

this will always evaluate to false, as the integer is promoted to unsigned. Using ssize_t will fix it.

Reasons:
  • Has code block (-0.5):
  • User mentioned (1): @Xavier
  • Low reputation (0.5):
Posted by: m2j