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
C++C++17C++20Learn C++SyntaxTemplates

What Are The New Fold Expressions In C++ 17

C++17 is another big milestone in the history of C++, it comes with a lot of new features. In C++17, the fold expressions feature is a powerful feature that allows us to fold a parameter pack over a binary operator. Folding Expressions are very useful with variadic templates, and this feature makes template arguments more readable and concise. There are 4 different types of usage and in this…
Read more
C++C++17C++20Introduction to C++Learn C++

What Are The CMath Mathematical Special Functions in Modern C++?

In C++11 and C++14, we were able to use this math.h library in C++ applications. After the C++17 standard, this library modernized math operations with the cmath library. Functions are declared in <cmath> header. For compatibility reasons the <math.h> is an optional alternative to support older code. In this post, we list most of these mathematical functions declared in the <cmath>…
Read more
C++C++11C++14C++17Learn C++Syntax

What is Assignment Operator In C++ Classes?

In C++, Classes and Objects are part of object-oriented methods and typically provide features such as properties and methods. One of the features of a C++ Editor are assignment operators such as copy assignment and move assignment operators. In C++, a copy assignment operator is used with “operator=” to create a new object from an existing one. In this post, we explain assignment…
Read more