C++C++14C++17C++20Learn C++Syntax

How To Use Tuple Addressing Via Type In C++14 And Beyond

The tuple ( std::tuple ) is a class template that stores the different types of elements, it also supports empty lists in modern C++. This template was introduced in C++11 and improved in C++14. In this post, we explain tuple addressing via type features that come with the C++14 standard. What is std::tuple in C++? The tuple ( std::tuple) is a class template a fixed-size collection of…
Read more
C++C++11C++14C++17C++20Learn C++

What Are The Amazing Containers In Modern C++?

Containers are powerful data storage arrays in modern C++ and they are very useful to iterate and search data with their amazing methods and properties. TheC++ Standardslibrary defines 4 container types. In this post, we explain containers in modern C++. What is a container in modern C++? Containers are modern data storage arrays in modern C++ and they are very useful to iterate…
Read more
C++C++11C++14C++17C++20Learn C++

Learn How to Use New And Delete Elisions In C++

The C++14 standard (and later), brings a lot of useful smart pointers and improvements on them. They help us to avoid the mistake of incorrectly freeing the memory addressed by pointers. In modern C++, we have the new and delete operators that are used to allocate and free objects from memory, and in this post, we explain how to use new and delete operators. Can we use new and delete elisions…
Read more
C++C++14C++17C++20Learn C++

How To Use std::exchange In C++

C++ is a very precise programming language that allows you to use memory operations in a wide variety of ways. Mastering efficient memory handling will improve your app performance at run time and can result in faster applications that have optimal memory usage. One of the…
C++C++14C++17C++20Learn C++Syntax

What Are The Relaxed Constexpr Restrictions In C++?

In C++, the constexpr specifier is used to declare a function or variable to evaluate the value of at compile time, which speeds up code during runtime. This useful property had some restrictions in C++11, these are relaxed in C++14 and this feature is known asRelaxed Constexpr Restrictions. In this post, we explain what are the relaxed constexpr restrictions in modern C++. What is the…
Read more