Classes and Objects are part of object-oriented methods and typically provide features such as properties and methods. One of the great features of an object orientated language like C++ is a copy assignment operator that is used with operator= to create a new object from an existing one. In this post, we explain what a copy assignment operator is and its types in usage with some C++…
What Is The New Optional Class Template In C++ 17?
January 2, 2024
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…
How To Use Alias Templates For Traits In C++ 17 and Beyond
December 27, 2023
One of the great features of C++ is templates, they are parameterized by alias templates in C++11. Then, In C++14 and C++17, they improved C++11’s feature with a number of template aliases whose use simplifies the traits. This feature is called “Alias Templates…
What Is Std::any In C++ 17 And How We Can Use It?
December 22, 2023
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…
What Is basic_string_view And string_view In Modern C++
December 22, 2023
C++17 had enormous changes in C++ features. One of them was basic_string_view (std::basic_string_view) which is a constant string container that can be used for multiple string declarations. The basic_string_view is a modern way of read-only text definition. It can be…
What Are The New Algorithms That Come With C++ 17?
December 18, 2023
The C++17 standard came with a lot of new features and improvements. One of the features was the math.h library which modernized math operations with the cmath library. The Parallelism Technical Specification adds several new algorithms to the standard C++ library that we…
What Are The Parallelism Features That Come With C++ 17?
December 14, 2023
With the C++17 standard, the contents of the Parallelism Technical Specification are added to modern C++, and as a result, make their way into many C++ compilers and IDEs, such as the latest C++ Builder 12. This feature adds new overloads, taking an additional execution policy argument, to many algorithms, as well as entirely new algorithms. Three execution policies are supported, which…
How to Use Basic String and Unicode String in Modern C++
December 8, 2023
In programming, one of the most used variable types are text strings, and they are sometimes really important when storing and retrieving valuable data. It is important to store your data safely in its language and localization. Most programming languages have issues when…
What Are The New Fold Expressions In C++ 17
December 8, 2023
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…
What Are The CMath Mathematical Special Functions in Modern C++?
November 29, 2023
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>…