Assignment of a Singular Iterator

后端 未结 2 1416
太阳男子
太阳男子 2021-01-27 03:06

A \"Singular Iterator\" is defined as an:

iterators that are not associated with any sequence. A null pointer, as well as a default-constructed pointer (

2条回答
  •  醉酒成梦
    2021-01-27 03:55

    Question 2 is: Does working with a result that is "undefined" constitute Undefined Behavior?

    Answer is: Definitely Yes. Working on UB is UB.

    It seems to run fine for you since it is undefined. It can do anything, this includes working as expected, as well as working not as expected.

提交回复
热议问题