Policies

I’ve been reading about templates a lot lately and kept seeing the word policy. Which made me realized I wanted a single post that answers the question: What is a policy? Why do C++ sources keep mentioning them? How do compile-time policies (templates) compare to runtime strategies (virtuals/std::function)? And when should which be used? ...

November 14, 2025 · 4 min · Hannupekka Sormunen

Concepts

Introduction C++20 shipped with Concepts — a long‑awaited way to express constraints on template parameters right where they live. Concepts turn the old “SFINAE and traits soup” into clear, readable predicates that the compiler can check for you. If you’ve ever stared at a 20‑line enable_if just to say “this needs to be integral,” this feature is for you. ...

November 6, 2025 · 3 min · Hannupekka Sormunen

Canonical Project Structure

If you’ve ever stared at a blank folder wondering where do I even start?, you’re not alone. I’ve been there—more than once. ...

September 21, 2025 · 3 min · Hannupekka Sormunen

Pointers & Arrays: a quick C refresher

A short note on pointer arithmetic and array decay in C…

September 8, 2025 · 1 min · Hannupekka Sormunen