Your Library
Chapter 15 · Pointers and containersOwnership, borrowing, fixed-size sequences, and alternatives
Contents
Chapter 14Sections 15.1–15.5

Pointers and containers

Ownership, borrowing, fixed-size sequences, and alternatives

Pointers are powerful because they let code refer to objects indirectly, but that flexibility makes lifetime and bounds errors easy. Resource handles, spans, and standard containers provide clearer contracts; related utility types such as variant, optional, and any express alternatives without inventing ad hoc conventions.

In this chapter

  1. 14.1Lesson 15: Pointers and Containers