January 2017

Template argument deduction for class template constructors -- Simon Brand

Showing how to use C++17 template argument deduction for constructors to get rid of those pesky make functions.

Template argument deduction for class template constructors

by Simon Brand

From the article:

Have you ever found yourself writing std::make_pair or std::make_move_iterator and wondering why we need a helper function to create these objects for us? The answer is a lack of template argument deduction for class template constructors.

[...]

Fortunately, this feature is coming in C++17!

Building a safety critical memory manager for self driving cars -- Illya Rudkin

What does it take to build a C++ memory manager for safety critical applications such as autonomous vehicles?

Codeplay's Safety-Critical Memory Manager

by Illya Rudkin

From the article

In my experience, when implementing an application, the memory management part of its design is very often overlooked. That is also the case when considering the design for a Safety-Critical (SC) system. This blog post talks about why a memory manager should be considered in the design, especially for an SC system, and why the designers of such systems should consider implementing it first, before doing anything else.

Codeplay has created a Safety-Critical Memory Manager (SCMM) as part of its strategy to build an SC tool set, including implementations of open standards (such as OpenCL) for building artificial intelligence in automotive systems. We believe that an SCMM is a fundamental foundation stone to help us achieve and verify the safety goals for our systems in different problem domains.

 

How PVS-Studio does the bug search: methods and technologies

PVS-Studio is a static code analyzer, that searches for errors and vulnerabilities in programs written in C, C++ and C#. In this article, I am going to uncover the technologies that we use in PVS-Studio analyzer. In addition to the general theoretical information, I will show practical examples of how certain technology allows the detection of bugs.

How PVS-Studio does the bug search: methods and technologies

by Andrey Karpov

From the article:

The definition of the pattern looks quite simple, but in practice the implementation of the diagnostic is quite complicated. It's not enough just to analyze only "#define RShift(a) a >> 3". If warnings are issued for all strings of this kind, there will be too many of them. We should have a look at the way the macro expands in every particular case, and try to define the situations where it was done intentionally, and when the brackets are really missing.

 

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.