Jul 28, 2025 |
Customization Point Objects
This post presents a technique for implementing extendable function objects that work with some common types by default, with the default being overridable. These kind of function objects can be called Customization Point Objects (CPO), an idiom introduced in C++20
Jul 13, 2025 |
String formatting for debugging
Some programming languages explicitly distinguish string formatting for debug purposes and string formatting for displaying to the user. Other languages, including C++, decide not to have such semantics in the standard library
Aug 20, 2024 |
A use case for std::launder: SOO
SOO is a great opportunity to show a use case for `std::launder`. Shortly, `std::launder` is about informing the compiler that we are about to access a memory location in a way that the compiler doesn't expect. Thus, it can do some safeguard work, like re-fetch the data to the registers
Jul 23, 2024 |
Faster algorithms with predictable data
Programming languages abstract you away from the hardware, so that you can write programs without knowing the hardware details. However, having some insight into hardware techniques can help you to write more efficient programs...
Sep 30, 2022 |
A way to start software engineering
The realm of software engineering is complex. I intentionally say complex rather than difficult. The complexity makes a beginner feel perplexed, but there is a simple essence understanding...