What is singular and non-singular values in the context of STL iterators?

前端 未结 4 623
北海茫月
北海茫月 2020-12-06 05:54

The section §24.1/5 from the C++ Standard (2003) reads,

Just as a regular pointer to an array guarantees that there is a pointer value pointing pa

4条回答
  •  臣服心动
    2020-12-06 06:39

    Iterators can also have singular values that are not associated with any container.

    I suppose that's its definition.

    How and why dereferenceable values are always nonsingular?

    Because if they wouldn't, dereferencing them would be undefined behavior.

提交回复
热议问题