Back
Close

Modern C++ idoms and recipes

meshell
57.5K views

Any type

C++17 added the std::any type to the standard library. It is designed to hold variables of any type and provides methods for type-safe inspection and access.

Exercise

Refactor the following code to use std::any.
Create your playground on Tech.io
This playground was created on Tech.io, our hands-on, knowledge-sharing platform for developers.
Go to tech.io