Articles & Books

The C++ Lifetime Profile: How It Plans to Make C++ Code Safer--Daniel Martín

A way to make C++ safer.

The C++ Lifetime Profile: How It Plans to Make C++ Code Safer

by Daniel Martín

From the article:

High amounts of low-level systems are written in C++. Memory access in C++ is virtually unrestricted, which means that bugs in C++ programs can corrupt it and cause crashes or security problems. For this reason, we call C++ a memory-unsafe programming language — in contrast to memory-safe languages like Java, Rust, and Swift.

In this blog post, I’ll talk about the C++ Lifetime Profile, explaining what it is, how it intends to reduce the problems typically caused by the memory-unsafe characteristics of C++, what the status of the current implementation of the Lifetime Profile is, and what the current limitations are...

C++17 – La guía completa -- Nico Josuttis

C++17 – La guía completa (the spanish edition of "C++17 - The Complete Guide" by Nico Josuttis) is out:

C++17 - The Complete Guide in Spanish

by Nico Josuttis

About the publication

Translated for the spanish C++ community by Javier Estrada with significant help by Daniel Garcia.

For details, see

How and why overloading, templates, and auto deduction were invented? -- Milad Kahsari

Are you a student and wanted to know How and why overloading, templates, and auto deduction WERE invented? read the following article.

How and why overloading, templates, and auto deduction invented?

by Milad Kahsari

From the article:

Why we need the template function/classes and how this concept created by C++ compiler engineers? In this medium post, I want to go through the steps which made c++ experts think about the template concept and auto in the modern days of software development.

C++ - Initialization of Static Variables--Pablo Arias

A good summary.

C++ - Initialization of Static Variables

by Pablo Arias

From the article:

You are probably reading this because you code in C++. This means that you have battled frustration mastering auto deduction rules or lost your sanity trying to understand why std::initializer_list was considered a good idea. Anyone who has been doing this long enough knows that variable initialization is everything but trivial. It’s a problem too essential to ignore but too challenging to master. Today I’m here to tell you that there is more to it...

2 Lines Of Code and 3 C++17 Features - The overload Pattern--Bartlomiej Filipek

Updated.

2 Lines Of Code and 3 C++17 Features - The overload Pattern

by Bartlomiej Filipek

From the article:

While I was doing research for my book and blog posts about C++17 several times I stumbled upon this pattern for visitation of std::variant:

template<class... Ts> struct overload : Ts... { using Ts::operator()...; };
template<class... Ts> overload(Ts...) -> overload<Ts...>;

With the above pattern, you can provide separate lambdas “in-place” for visitation.

It’s just two lines of compact C++ code, but it packs a few interesting concepts.

Let’s see how this thing works and go through the three new C++17 features that make this patter possible...