The Code Analyzer is wrong. Long live the Analyzer!

Combining many actions in a single C++ expression is a bad practice, as such code is hard to understand, maintain, and it is easy to make mistakes in it. For example, one can instill a bug by reconciling different actions when evaluating function arguments. We agree with the classic recommendation that code should be simple and clear. Now let's look at an interesting case where the PVS-Studio analyzer is technically wrong, but from a practical point of view, the code should still be changed.

The Code Analyzer is wrong. Long live the Analyzer!

by Andrey Karpov

From the article:

As you can see, once upon a time std::make_pair was taking arguments by value. If std::unique_ptr had existed at that time, then the code above would have been indeed incorrect. Whether this code would work or not would be a matter of luck. In practice, of course, this situation would never have occurred, since std::unique_ptr appeared in C++11 as a replacement for std::auto_ptr. Let's go back to our time. Starting with C++11, the constructor started to use move semantics.

Under the Covers of C++ Lambdas: Captures, Captures, Captures--Andreas Fertig

Lambdas.

Under the Covers of C++ Lambdas: Captures, Captures, Captures

by Andreas Fertig

From the article:

Lambda Capturing syntax allows us to quickly “wrap” a variable from the outside scope and then use it in the lambda body. We also know that under the hood the compiler translates lambda into a closure type… but what happens to those captured variables? Are they translated to public data members or private? See the newest guest post from Andreas to understand this tricky problem...

Capture *this in lambda expression: Timeline of change -- Hitesh Kumar

The current object (*this) capture in a lambda expression has gone through some changes since C++11.

Capture *this in lambda expression: Timeline of change

by Hitesh Kumar

From the article:

A lambda defined inside a non-static member function can directly access the members of the current object (or its copy) via an appropriate capture clause. But how the current object can be captured has gone through some changes since C++11.

I/O Prioritization in Windows OS -- Milad Kahsari Alhadi

In this paper, I am going to discuss how can we as the application or device driver developers take advantage of I/O prioritization in the Windows OS.

I/O Prioritization in Windows OS

by Milad Kahsari Alhadi

From the article:

I/O prioritization improves the responsiveness of the system without significantly decreasing the throughput of the system. Typically, any topic related to I/O and threads requires a good understanding of Windows synchronization because of that, I will try to discuss everything from the ground up.


In this paper, I am going to discuss how can we as the application or device driver developers take advantage of I/O prioritization in the Windows OS. Finally (in the next paper, I will discuss the I/O completion mechanism of Windows) which is a magical feature.

Concepts in C++20 -- Richard Thomson

Richard Thomson gives an informal overview of Concepts in C++20 at the July, 2020 meeting of Utah C++ Programmers.

Concepts in C++20

by Richard Thomson

From the video description:

In this talk, Richard Thomson will give us an informal overview of Concepts in C++20. We'll take a look at the following details:

  • Concept syntax
  • Concepts in the standard library
  • Concepts relating to ranges
  • Improved error diagnostics (using compiler explorer)

YouTube: https://www.youtube.com/watch?v=KRB6b9SccvA

Illuminating Lambda Expressions in C++ -- Richard Thomson

Utah C++ Programmers has released a video on lambda expresssions in C++.

Illuminating Lambda Expressions in C++

by Richard Thomson

From the video description:

Richard Thomson gives us an insight into lambda expressions in C++ by showing the equivalent manually written function objects.  The presentation proceeds from lambda expressions as originally defined in C++11 and then proceeds through enhancements from C++14, C++17 and finally C++20.

YouTube: https://www.youtube.com/watch?v=GVqwkiqCj7w