intermediate

Ranges: the STL to the Next Level--Jonathan Boccara

Ranges are coming!

Ranges: the STL to the Next Level

by Jonathan Boccara

From the article:

The C++ Standard Template Library (STL) is a fantastic tool for making code more correct and expressive. It is mainly composed of two parts:

  • The containers, such as std::vector or std::map for instance,
  • The algorithms, a fairly large collection of generic functions that operate amongst others on containers. They are mostly found under the algorithm header.

A “sorted view”--Nick Athanasiou

Sorting can be done many ways.

A “sorted view”

by Nick Athanasiou

From the article:

This installment elaborates on the creation of a “sorted_view” utility. The “References” section contains links to the complete code; throughout the article, we provide demos and snippets to showcase and explain the implementations. The section on modernizing the code contains real world applications of the following C++17 features:

  1. structured bindings
  2. template argument deduction for class templates

Order Your Members

How ordering members can impact performance.

Order Your Members

by Jonas Devlieghere

From the article:

The article highlights the impact that different choices regarding the ordering of members in a struct can have on the performance of your code. A lot can be achieved by taking into account some general guidelines.