September 2017
Beginner to intermediate
384 pages
9h 18m
English
Raw pointers have many uses in C:
In C++, we have native references (const Foo& and Foo&) to handle the first two bullets; plus, move semantics makes it cheap for a callee to take and pass back a complex object by value in most cases, thus completely avoiding aliasing. In C++17 we can use std::string_view to address some of the first and third bullet. And we've just seen in Chapter 5, Vocabulary Types, that passing an optional<T>--or perhaps ...
Read now
Unlock full access