Search⌘ K
AI Features

Introduction

Explore the fundamentals of std any in C++17 to understand its role as a type safe wrapper capable of holding any type. This lesson covers why void pointers are unsafe, introduces std any usage, showcases practical examples, and explains how to use any cast effectively.

Why use std::any?

With std::optional you can represent a regular Type values or mark it as empty. With ...