Search⌘ K
AI Features

Introduction

Explore the std optional utility added in C++17 to model nullable types and write safer code. Understand why nullable types are needed, how std optional works, common operations, performance aspects, and practical examples for effective usage.

We'll cover the following...

C++17 adds a few wrapper types that make it possible to write more expressive code. In this chapter, you’ll see std::optional, which ...