Vivek Galatagevivekgalatage.hashnode.dev路Mar 20, 2023Sparrow - C++ Type CheckerLet's start with a problem. #include <iostream> #include <utility> struct Person { Person(int a) : age(a) {} int age = -1; }; int main() { Person p1(40); Person p2 = std::move(p1); std::cout << "Age of Person 1: " << p1.age << " years" <<...91 readsC++
Omkaromkaracharekar.hashnode.dev路Nov 24, 2021Maximizing Performance with C++ Move Semantics: Exploring the Benefits of Resource Transfers, Reduced Overhead, and Improved Memory AllocationIntroduction 馃挕 C++11 introduced a powerful new feature called move semantics. This feature allows for more efficient use of memory and can greatly improve performance in certain scenarios. In this article, we will explore what move semantics are, ho...6 likes路81 readsMove Semantics