Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Do not use a reference, pointer, or iterator that has been invalidated, as that results in undefined behavior. This rule is a specific instance of CTR32CTR51-CPP. Use valid references, pointers, and iterators to reference elements of a container.

Noncompliant Code Example

...

Related Guidelines

Bibliography

[ISO/IEC 14882-2014]

21.4.1, "basic_string General Requirements"

[Meyers 01]Item 43: Prefer algorithm calls to hand-written loops

 Image Removed Image Removed Image Removed

...

Image Added Image Added Image Added