Modifying the Referenced Objects

Learn how to use a subspan to modify the referenced objects with an example.

You can modify an entire span or only a subspan. When you modify a span, you modify the referenced objects.

The following program shows how a subspan can be used to modify the referenced objects from a std::vector.

Get hands-on with 1200+ tech skills courses.