C++C++17C++20Learn C++

What Is The New Optional Class Template In C++ 17?

The C++17 standard came with a lot of great features and std::optional was one of the main features of today’s modern C++. std::optional<T> is a class template that is defined in the <optional> header and represents either a T value or no value. In this post, we explain, what is optional in modern C++ and how we can use it efficiently. What is the optional class template in C++ 17…
Read more