String View

As will be discussed in the GSL section of this chapter, there is a push within the C++ community to remove direct access to both pointers and arrays. Most segfaults and vulnerabilities discovered in applications can be attributed to the mishandling of pointers and arrays. As programs become more and more complex, and modified by multiple people without a complete picture of the application and how it uses each and every pointer and/or array, the likelihood of an error being introduced increases.

To address this, the C++ community has adopted the C++ Core Guidelines: https://github.com/isocpp/CppCoreGuidelines.

The goal of the C++ Core Guidelines is to define a set of best practices that help to prevent common mistakes that are ...

Get Hands-On System Programming with C++ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.