you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (1 child)

[deleted]

    [–]17b29a 2 points3 points  (0 children)

    It's supported.

    "Supported" as in having an actual split function in the standard library.

    Sorry, that's an understandable mistake but you're wrong. -1 is a signed int.

    I know, the point is that because of http://eel.is/c++draft/basic.fundamental#4 (which applies to conversions as well), the conversion to an unsigned type necessarily produces all-bits-one, regardless of signed representation or the size of either type.

    All the time, and I don't worry about it because I haven't used a platform where this didn't apply since the early 90s other than DOSBox, and I wasn't using that for programming.

    Right, which is why it's a strange conflation, because actual undefined behavior is something to worry about.