Clang-Tidy, part 2: Modernize your source code using C++11/C++14. The blog series introduces you to the clang-tidy utility and how to use it to automatically refactor C++ source code and integrate it with your build system.
Blog Archives
clazy 1.2 released presenting 5 new Qt compile-time checks
In the previous episode we presented how to uncover 32 Qt best practices at compile time with clazy. Today it’s time to show 5 more and other new goodies present in the freshly released clazy v1.2. New checks 1. connect-not-normalized Warns when the content of SIGNAL(), SLOT(), Q_ARG() and Q_RETURN_ARG() is not normalized. Using normalized […]
Efficient barcode scanning with QZXing Profiling Qt Zebras Crossing
QZXing is a very useful library: It provides an easy to use Qt integration API around the barcode scanning library ZXing (zebras crossing). Because it is so easy to setup QZXing in a Qt application, we and most of our customers end up using it when they need to scan images for barcodes. There is, or rather […]
Safety critical drawing with OpenGL SC The main sticking points when migrating OpenGL ES software to functionally safe OpenGL SC
Bringing software into a safety critical environment can be tricky, especially when using the complex APIs needed for modern 3D graphics. That’s what makes OpenGL SC (Safety Critical) so important: it bridges the gap between beautiful displays and functional safety, while trying to remain as close to existing embedded standards that we all know and love. OpenGL SC will only […]
Clang-Tidy, part 1: Modernize your source code using C++11/C++14 Automated refactoring of your source code using powerful open-source tooling
This blog series will introduce the clang-tidy utility from the Clang/LLVM project and show how to use it to automatically refactor
Heaptrack v1.0.0 Release First stable release of the fast Linux heap memory profiler
I’m extremely happy to finally announce the first stable release of heaptrack, the FOSS heap memory profiler for C/C++ Linux applications. You can download the source tarball from the KDE mirrors: https://download.kde.org/stable/heaptrack/1.0.0/src/ Heaptrack is a fast heap memory profiler that runs on Linux. It allows you to track all heap memory allocations at run-time. Afterwards, the accompanying GUI […]
A Race is a Race is a Race is UB An example of the difference between int, volatile int, and std::atomic
In the last days, I was once again trying to convince fellow programmers that there’s no such thing as a “benign” data race. This is a recurring theme, in particular fueled by the docs of MSVC and Intel x86, which basically seem to say “you don’t need atomics here”. I perused the excellent papers Benign […]
Stepanov-Regularity and Partially-Formed Objects vs. C++ Value Types
In this article, I will take a look at one of the fundamental concepts introduced in Alex Stepanov and Paul McJones’ seminal book “Elements of Programming” (EoP for short) — that of a (Semi-)Regular Type and Partially-Formed State. Using these, I shall try to derive rules for C++ implementations of what are commonly called “value […]
Writing Code That Won’t Kill A collection of reading material, white papers, and academic journals about functional safety
Functional Safety is the term used for systems designed to minimize risk to human health. But there’s a dilemma in today’s tech-driven world. We are more reliant than ever on software to control our planes, trains, cars, and boats, to operate our medical equipment, to process our food, to clean our water, and to power […]
Tuple And Pair in C++ APIs? A Simple Design Goal to Improve Your C++ APIs
Quick: When you design C++ APIs, when and how should you use pair and tuple? The answer is as simple as it is surprising: Never. Ever. When we design APIs, we naturally strive for qualities such as readability, ease-of-use, and discoverability. Some C++ types are enablers in this regard: std::optional, std::variant, std::string_view/gsl::string_span, and, of course, […]