March 2021

Creating other types of synchronization objects that can be used with co_await, part 4--Raymond Chen

The series continue.

Creating other types of synchronization objects that can be used with co_await, part 4

by Raymond Chen

From the article:

Now that we’ve finished our library for building awaitable synchronization objects, let’s actually use it.

The introduction to this part of the series began with a demonstrate of a one-shot event. So let’s take it a step further and make it a resettable event...

C++ Fold Expressions 101--Jonathan Boccara

Back to the basics.

C++ Fold Expressions 101

by Jonathan Boccara

From the article:

C++17 brought fold expressions to the language. This interesting feature allows to write expressive code, that almost seems magical.

Here is a two-posts recap on how fold expressions work (this post) and how they can improve your code (the next post).

How to use C++ for Cross-Platform Development--Gusts Kaksis

Code once, deploy everywhere.

How to use C++ for Cross-Platform Development

by Gusts Kaksis

From the article:

My current line of work revolves around an app that runs on four platforms – Android, iOS, macOS and Windows. It’s core code base is written in C++ and it uses Objective-C (on iOS and macOS) and Java (on Android) to access native APIs. I wanted to share some tips and tricks that I’ve accumulated over time on how to make the ends meet.

This article will mainly concentrate on languages and so called backend part of the application, if you are also interested in cross-platform UI development, then that is a whole another story and I won’t be covering it here. I can only mention some good frameworks to start with, like Qt, React Native, Flutter to name a few (the latter two being further away from C++, but they have C++ bindings)...

Creating other types of synchronization objects that can be used with co_await, part 3--Raymond Chen

The series continue.

Creating other types of synchronization objects that can be used with co_await, part 3

by Raymond Chen

From the article:

Last time, we developed a library for building awaitable synchronization objects. I noted that when the coroutines are released, they are resumed in sequence, which means that one coroutine can prevent others from progressing. Let’s resume them in parallel...

Creating other types of synchronization objects that can be used with co_await, part 2--Raymond Chen

The series continue.

Creating other types of synchronization objects that can be used with co_await, part 2

by Raymond Chen

From the article:

Last time, I teased a library for building awaitable synchronization objects. It builds on the code had earlier written for one-shot events by distilling the pattern to its essence and then rebuilding it in a more generic way...

Job related results from the Meeting C++ community survey

Taking a look at the job related questions from the Meeting C++ community survey.

Job related results from the Meeting C++ community survey

by Jens Weller

From the article:

I started a blog series about the results for 2020 of the Meeting C++ Community survey. As next week is the second online C++ Job fair, I thought I take a look at the job related questions.

This time all graphs show the result of 2020 on the left and the current result for 2021 on the left. So you can compare and see a few first changes to 2020. Mostly the results are similar though, most questions have so far around ~200 answeres in 2021. If this trend continues, 2021 is going to collect again around 1-1.5k answers per Question it seems.

Lets start with what is your job title today?

PVS-Studio 7.12 New Features for Finding Safety and Security Threats

At the moment, PVS-Studio is developing not only as a static analyzer searching for code quality defects (quality control solution) but also as a solution for searching for security and safety defects.

PVS-Studio 7.12 New Features for Finding Safety and Security Threats

by Nikolay Mironov, Paul Eremeev

From the article:

Well, to waste no time, let's point out the additions right away. So, here is what's new, safe, and cool in PVS-Studio:

  • New diagnostic groups OWASP ASVS and The AUTOSAR C++14 Coding Guidelines have been added to the analyzer. Previously, the compliance of PVS-Studio diagnostic rules with these standards was available only on our website. Now we have more than 50 new diagnostic rules!
  • Now the analyzer shows information about the compliance of the warnings with the SEI CERT Coding Standard. This information formerly was available only on the PVS-Studio website.
  • The interface of our plugins for Visual Studio, JetBrains Rider, and IntelliJ IDEA has been improved to ease the work with analyzer messages that have safety and security standards identifiers.
  • New diagnostic groups (OWASP, AUTOSAR) in PlogConverter are supported.
  • New diagnostics (OWASP, AUTOSAR) are supported in SonarQube at the tag level. We classified our diagnostic rules by OWASP Top 10.

Creating other types of synchronization objects that can be used with co_await, part 1--Raymond Chen

A new series.

Creating other types of synchronization objects that can be used with co_await, part 1

by Raymond Chen

From the article:

So far, we’ve been looking at how we could build a one-shot event that can be used with co_await. There are other types of synchronizations objects you may want to use with coroutines, so let’s write a library for creating all sorts of awaitable synchronization objects...

Parameter Passing in C and C++--Scott Wolchok

Let's go down to the metal.

Parameter Passing in C and C++

by Scott Wolchok

From the article:

Now that we know how to read assembly language, we can talk about how parameter passing works at the machine level and its consequences for writing faster code. We will focus on x86_64, but ARM64 works in a roughly similar way...

Concise Result Extraction in Modern C++--David Gorski

Template magic.

Concise Result Extraction in Modern C++

by David Gorski

From the article:

A popular idiom in functional programming is the use of sum types to express results or optional values. When a function returns, it either succeeded and we get the result, or it failed and we have an error on our hands. This is a pattern in Modern C++ as well, enabled by standard library types such as std::variant and std::optional. In this article we will explore how to improve the ergonomics of handling multiple results and potential error values...