Generic selection in C11

04 February 2026
It's been almost 3 years since my last post. But I'm back! C11 Introduced _Generic, a keyword that gives us compile-time type dispatch, the closest C gets to function overloading, with zero runtime cost. Contents...

The power of C++11 user-defined literals

29 April 2023
C++11 introduced a powerful feature called user-defined literals (UDLs) that allows us to create custom literals with their own meaning and syntax. This addition enables more expressive and readable code, especially when dealing with specific domai...

C++ arithmetic types

29 March 2023
Arithmetic types are divided in two catogories:...

Implementation of unique_ptr in C++98

21 February 2023
Introduced in c++11, unique_ptr is a smart pointer, I already have a post about what are smart pointers, in that post I sorted pointers by order of usefulness, being unique_ptr the mos...

Constant types in C++20: const, constexpr, consteval and constinit

27 January 2023
As of c++20 with the addition of consteval and constinit there are 4 keywords begginning with const. What do they mean? Are they similar? Let's look at them. Contents...

How to use std::format in C++20

26 January 2023
Introduced in c++20, <format> in a text formatting library based on three simple principles:...

How to convert int to string in every C++ standard

25 January 2023
What is the easiest way to convert from int to string in C++? In this post we will take a quick look on how to do it in every standard (up to c++20). Contents...

Smart pointers in C++: auto_ptr, unique_ptr, shared_ptr, weak_ptr and raw pointers

23 January 2023
Since c++11 we have a lot of smart pointers, we see here the various types of pointers that exists out there, sorted by decreasing order of usefulness (according to me): - std::unique_ptr (since c++11) - raw pointer - st...

Implementation of nullptr in C++98

17 January 2023
Introduced in c++11, nullptr is a useful keyword, the advantage of nullptr over NULL is, that nullptr acts like a real pointer type thus it adds type safety whereas NULL acts like an ...

Inline namespaces in C++

14 January 2023
C++11 introduced inline namespaces, but what are inline namespaces? Contents...
Older