Modern C++ Tutorials

C++ Lambda - A Complete Tutorial

In Modern C++, Lambdas were introduced with C++11 to make the life of Developers easier. But what exactly is a Lambda Function, and why do we need it? In this tutorial we will learn about Lambda Functions in C++ in detail with examples.

Move Constructor and Move Assignment Operator in C++

Move semantics were introduced in C++11 along with R-value references. It allows us to avoid unnecessary copying of resources from one object to another. Instead of copying, we can now move or transfer the resources between objects, essentially transferring the ownership of resources from one object to another. This feature is especially valuable when working with classes that manage dynamic resources, like dynamically allocated memory. In this tutorial, we will look into move semantics and the use of the new std::move() function.

L-Values vs R-Values in C++11

R-Values were introduced in C++11. Now, in C++, expressions can be categorized as L-Values or R-Values, and understanding the differences between L-Value and R-Value is important when dealing with assignments, function returns, and references. In this tutorial, we will discuss L-Values and R-Values in detail, and this will act as a foundation for move semantics in upcoming tutorials.