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

What Is List (std::list) In Modern C++?

Containersare powerful data storage arrays in modern C++ and they are very useful to iterate and search data with their amazing methods and properties. A container is a holder object that stores data elements (a collection of data objects). std::vector, std::array, std::set are these kinds of containers. There is another useful container, in this post, we explain what std::list is. Before…
Read more
C++C++17C++20Learn C++SyntaxTemplates

How To Use void_t Alias Template in C++ 17?

In C++ 17, there is a very useful alias template for metaprogramming that can be used to simplify use of SFINAE. The void_tis a meta-function that is used to map any types ( or types) to typevoid. In this post, we explain what is void_t, how you can use it in different examples. What is alias template void_t in C++ 17? The void_t is an alias template which is introduced with…
Read more
C++C++17C++20Learn C++

What Is The Class Template Variant (std::variant) in C++ 17?

In C++ Builder 12, and modern C++ the std::variant is one of the powerful features that comes with C++17. The std::variant is a discriminated union that we can work with multiple data types. It represents a type-safe union and holds one of its types in definition. What is the class template std::variant in C++ 17? The std::variant is a class template defined in <variant> header that…
Read more
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