Price your future right. 60% off with code BLACKSCHOLES at USD checkout. Offer ends in 8d 09h 54m 26s8 days 9 hours 54 minutes 26 seconds.
Price your future right. 60% off with code BLACKSCHOLES at USD checkout. Offer ends in 8d 09h 54m 26s8 days 9 hours 54 minutes 26 seconds.

Sign in to watch this lesson
Ownership Types, Views and Type Erasure · 4:27
Not every piece of code should own what it touches. We look at string_view and span, which borrow a pointer and a length without owning anything (and dangle if the owner dies first), then at the sum types: optional for a value or nothing, variant with visit for one of a fixed set of types, and any for anything at all, with every size and error measured on a real machine.