Chapter 30
Borrowing Without Owning
References, pointers, string_view, and dangling.
Part 2
This chapter needs a key
References, pointers and string_view all let you use something without owning it, and all three break the same way. This chapter is about the one question that decides whether your code is correct, which is how long the thing you borrowed lives.
You'll build: Four ways to dangle. Build every borrowing bug in this chapter and find out which ones the compiler catches.
Part 1, chapters 0 to 21, is free and always will be.