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++14C++17Learn C++Syntax

What Is The Integer Sequence (std::integer_sequence) In C++ 14

In modern programming sometimes we want to use a sequence of integers that are created at compile-time. In C++14, the std::integer_sequence is a class template for the sequence of integers that is generated at compile-time. In this post, we explain what integer sequence (std::integer_sequence) is in modern programming. What is the integer sequence (std::integer_sequence) in C++ 14? In C++14…
Read more
C++C++14C++17C++20Learn C++Syntax

What Is std::quoted Quoted String In Modern C++?

Sometimes we want to preserve the string format especially when we use string in a string with /”. In C++14 and above, there is a std::quoted template that allows handling strings safely where they may contain spaces and special characters and it keeps their formatting intact. In this post, we explain std::quoted quoted strings in modern C++. What Is Quoted String In Modern…
Read more
C++C++14C++17C++20Learn C++SyntaxTemplates

How To Use Variable Templates In Modern C++

The template is one of the great features of modern C++. They are a simple and very powerful statement in C++ that defines the operations of a class or function. The C++14 standard and above allows the creation of variables that are templated. In this article, we will explain variable templates in C++ with examples that can be used in a professional IDE and compiler that supports C++14…
Read more