Search⌘ K
AI Features

Summary

Explore how to use std any to store values of any type safely and flexibly in C++17. Understand its small buffer optimization, when dynamic memory is allocated, and how to retrieve values using any cast. Learn differences from std variant and best use cases for each.

We'll cover the following...

Some of the highlights are as follows:

  • std::any is not a template class
  • std::any uses Small Buffer
...