C++C++17C++20Introduction to C++Learn C++Syntax

What Is Std::any In C++ 17 And How We Can Use It?

C++17 standard is amazing with a lot of new features, and one of the interesting features was the new type std::any. std::any is a type-safe container to store a single value of any variable type. In this post, we explain std::any in modern C++. What is std::any in C++ 17 ? The any class (std::any) is a new class defined in the <any> header in C++17 and it is used for any type…
Read more