// C++ architecture · performance · embedded

Deep dives into
modern C++

Patterns, performance techniques, and embedded systems for engineers who care about the details.

types-data 26 Aug 2024 6 min read

Template metaprogramming and C++20 Concepts

From SFINAE to Concepts: how to constrain templates, write type traits, and enforce compile-time contracts. Practical C++17 and C++20 patterns without academic theory.

#templates#concepts#c++20#c++17#metaprogramming
snippets 29 Jul 2024 5 min read

CRTP mixin examples

Ready-to-use CRTP mixins: logging, enable/disable toggle, singleton, comparable, printable. Drop into any class to add behaviour without virtual dispatch.

#crtp#mixins#templates#patterns#c++
view all →
view all →
view all →
embedded 08 Apr 2024 5 min read

HAL vs bare-metal register access on STM32

When STM32 HAL is the right call, when register access beats it, and how to mix both in a layered firmware architecture without creating a mess.

#stm32#hal#bare-metal#embedded#firmware
view all →
snippets 29 Jul 2024 5 min read

CRTP mixin examples

Ready-to-use CRTP mixins: logging, enable/disable toggle, singleton, comparable, printable. Drop into any class to add behaviour without virtual dispatch.

#crtp#mixins#templates#patterns#c++
snippets 08 Jul 2024 5 min read

Object pool allocator

A type-safe, fixed-capacity object pool for embedded and real-time systems. O(1) allocation and deallocation, no heap fragmentation, compatible with unique_ptr.

#allocators#embedded#performance#memory#patterns
snippets 06 May 2024 5 min read

Thread-safe singleton — C++11 and beyond

The only correct singleton implementation in C++11. Why double-checked locking was broken before C++11, why it works now, and when to avoid singletons entirely.

#singleton#concurrency#c++11#patterns